PDA

View Full Version : Dynamic cube map generation



RGHP
12-27-2007, 08:20 AM
Hello, I want to creat a Cube map dynamically(the scene is an ocean with a dynamic surface). So I think that i should attach GL_COLOR_ATTACHMENT_0-5 of a FrameBuffer to the 6 faces of a cube map texture right, and then draw face per face using:

glDrawBuffer(glColorAttahcment0+i);

My doubt is that the FBO is going to have 6 color attachments, but my card only supports 4 render targets. Will this be a problem. I'm drawing one face at a time so I tink this algorithm is correct, but I would like that some of you could confirm me this :S.

Bye

-NiCo-
12-27-2007, 08:54 AM
If you're drawing them one face at a time you can just attach each of the faces to GL_COLOR_ATTACHMENT_0 in turn, no?

N.