PDA

View Full Version : Dynamic Cubemapping with FBO's



stringa
08-25-2008, 12:02 PM
I come here because people are slacking on gamedev.net.

I obviously want to do dynamic cubemapping with FBO's but I'm not sure what texture calls to make

1st) Do I really need 6 fbo's verse 1 FBO with 6 accumulation buffers ( clearing the depth buffer each time )?

Otherwise, I'm just not sure what calls to make when

Assumeing I need 6 FBo's, I actually create a texture for the accumulation buffer with glTexImage2D( GL_TEXTURE_2D ).

But when I create a cubemap, I need to create textures with glTexImage2D( GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT + i ... ); ..

So in my FBO, do i just create my texture as if it was part of the cubemap itself, specifically ( GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT + i ... ) ?

thanks in advance...

stringa

arekkusu
08-25-2008, 08:11 PM
Apple's FBO sample code (http://developer.apple.com/samplecode/FBOBunnies/index.html) demonstrates dynamic cube maps. It uses one FBO and attaches each cube face in turn. There are other ways to do this, but this is simple and works.