Sign in to follow this  
geniusanmol

glGetTexImage() with cube maps

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this