PDA

View Full Version : glGetTexImage() and cube maps ?



Anmol
03-17-2006, 09:30 PM
im using glGetTexImage() to read the cube map, which i have rendered into thru an FBO. im interested only in the 1x1 mipmap, created with glGenerateMipmapEXT(). the problem is that i get a <0,0,0> value for GL_TEXTURE_CUBE_MAP_POSITIVE_X, but other faces are simply ignored. i get no value for them. i tried glError() and it says INVALID_INPUT.

the cube map size is 32x32. the calls are:-

float rgb[3];
glBindTexture( GL_TEXTURE_CUBE_MAP, iCubeTexID );
glGetTexImage( GL_TEXTURE_CUBE_MAP_POSITIVE_X, 5, GL_RGB, GL_FLOAT, rgb );
---------------------upto this it works

---> here INVALID_INPUT is returned by glError(). i can't figure out Y?

glGetTexImage( GL_TEXTURE_CUBE_MAP_POSITIVE_X+1, 5, GL_RGB, GL_FLOAT, rgb );
glGetTexImage( GL_TEXTURE_CUBE_MAP_POSITIVE_X+2, 5, GL_RGB, GL_FLOAT, rgb );
...
... --------i get no value in rgb[3], for these calls.