RenderTarget with PixelToaster
March 13th, 2006 by BramzI’ve just implemented a RenderTarget called Display which shows the image on screen while being rendered. I’ve used the almighty PixelToaster to accomplish this, which turned out to be pretty easy. Here’s the recurring red sphere on a blue checkerboard plane being rendered in a window:
One lesson learned: you should never update a PixelToaster display in another thread than in the one you’ve opened it. Upon the first call of update(), somewhere deep inside the function, there’s a call to the Win32 ShowWindow function (the window still is hidden when you open it). However, that call will block when it’s called from a different thread than the one to create the window …
Things to do: currently, the window closes the moment the render is finished … We’ll need the “press any key” feature!