glGetTexImage() with cube maps

Started by
2 comments, last by geniusanmol 18 years ago
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. [Edited by - geniusanmol on March 17, 2006 9:30:08 AM]
Advertisement
have u tried it with syandard GLubyte instead of GLfloat?
Be sure to unbind the framebuffer your texture is attached to first. I also get only black textures if I want to call glGetTexImage on it when it is still bound.

-Nitro
hi guys, thanks for ur response. i guess floating point texture mipmap generation is not supported on the card. Now i make mipmaps manually and use glReadPixels() instead od glGetTexImage(), and its working. :)

This topic is closed to new replies.

Advertisement