• Advertisement
Sign in to follow this  

glGetTexImage() with cube maps

This topic is 4340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement