Count Duckula
10-11-2006, 02:08 PM
Hello all,
I'm using a FBO to render to texture the six faces of a cubemap every x frames. It seems to work fine but I'd like to access each face to display some small billboards to make sure the sides are being rendered correctly.
During rendering to texture I set each cubemap face like this:
glFramebufferTexture2DEXT(
GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT+face,
m_nCubeMapTexture,
0 );
To render the billboards I've tried with something like:
glEnable( GL_TEXTURE_CUBE_MAP );
glBindTexture( GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();or
glEnable( GL_TEXTURE_CUBE_MAP );
glBindTexture( GL_TEXTURE_CUBE_MAP, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();or
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();
But it doesn't seem to work. I only get a half white/half pink quad haha. So I was wondering if somebody knows if it's actually possible to access each cube side
Thanks for any help!
J
I'm using a FBO to render to texture the six faces of a cubemap every x frames. It seems to work fine but I'd like to access each face to display some small billboards to make sure the sides are being rendered correctly.
During rendering to texture I set each cubemap face like this:
glFramebufferTexture2DEXT(
GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT+face,
m_nCubeMapTexture,
0 );
To render the billboards I've tried with something like:
glEnable( GL_TEXTURE_CUBE_MAP );
glBindTexture( GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();or
glEnable( GL_TEXTURE_CUBE_MAP );
glBindTexture( GL_TEXTURE_CUBE_MAP, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();or
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, m_nCubeMapTexture );
...
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();
But it doesn't seem to work. I only get a half white/half pink quad haha. So I was wondering if somebody knows if it's actually possible to access each cube side
Thanks for any help!
J