Dynamic cube map generation

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

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.