I jokingly said to my friend James Todd that it'd be cool to show FreqWars playing by itself mapped on to the surface of a sphere that's rotating as the background to the title screen of my game FreqWars.
Unfortunately, this seemed like a rather ambitious goal because it would have required me implementing pbuffers. Now, being the conscious Smalltalker that I am, if I'm going to make it work on one platform, I'd want it to work on all platforms.. so I'd have to do native pbuffers on each and every platform. Ouch, what a pain.
OpenGL to the rescue. It turns out there's a GPU command you can use to copy the screen in to a texture.. thus allowing you to render a scene on to a texture, then render a scene on to the screen using that texture. So I've just finisihed a new example called RenderOntoTexture which does just that.
The below movie is difficult to grok - so here's what you're seeing. There is a six sided cube, rotating around on the screen. Each side of the cube maps a texture that is a four sided pyramid. The four sided pyramid is rotating too. Complex, I know.. but the result is significant and meaningful.
OpenGL-20080409-RenderOntoTexture.mov