retrieving values from a cubemap...

I was thinking to use a cubemap to store some normal-dependent values for the various vertices, when it came to my mind the question:
Is it possible to retrieve the data i stuffed into a cubemap from OpenGL apps?
I know it is possible from the shaders, but i need em into the application…

thanks enrico

glGetTexImage?

Originally posted by JustHanging:
glGetTexImage?
don’t think that would work with cube maps,
and by the way that would give me the entire tex,
while i’d like to have just on cell…

glGetTexImage will allow you to get the individual faces of a cubemap. Just pass in GL_TEXTURE_CUBE_MAP_{POSITIVE|NEGATIVE}_{X|Y|Z}_ARB as the target parameter.

It begs the question - you put the cube map there, so why do you need to retrieve it from the hardware resources? Surely keeping a copy of the data you sent would be the sensible choice here?

Originally posted by knackered:
It begs the question - you put the cube map there, so why do you need to retrieve it from the hardware resources? Surely keeping a copy of the data you sent would be the sensible choice here?
yep yurright
but it would heve been so nice to have all the commodities of the cubemap without having to build a custom algo for that.

Of course you could draw the data to the back- or pbuffer and read it back using glReadPixels. You might lose some precision on 16-bit displays, though.

-Ilkka