View Full Version : Why no glGetTexSubImage() ??

02-07-2007, 03:40 PM
I want to read the colour of a single texel in a large GL texture (for diagnostic purposes).

Do I /really/ have to either use glGetTexImage() to copy the /entire/ texture into CPU RAM ;
or render a portion into the frame buffer and use glReadPixels() hoping the render preserved the colour?

Both approaches suck bigtime when all I want to do is peek particular single texel cells. glGetTexSubImage() would do what I want if it existed but it doesn't seem to be implimented.

Can anybody help? TIA.

02-07-2007, 04:04 PM
Attach the texture to an FBO. When the FBO is bound you can ReadPixels from it.

02-08-2007, 12:35 PM
OK thanks. Can you direct me to suitable online DOCs for FBO s?

02-08-2007, 12:40 PM
The specification provides some examples and is well-suited as a tutorial