I’m currently trying to read the contents of textures to dump their raw contents on disk.
I’m trying to use PBOs (GL_PIXEL_PACK_BUFFER) as glGetTexImage is supposed to raise a GL_INVALID_OPERATION error if there’s not enough memory in the PBO.
Everything is fine on NVidia, but on ATI I have unexpected GL_INVALID_OPERATION errors happening on certain pixel formats :
[ul][li]GL_R3_G3_B2, supposed to be 1 byte per pixelGL_RGB16, supposed to be 6 bytes per pixelGL_RGB32F, supposed to be 12 bytes per pixelGL_RGB8, supposed to be 3 bytes per pixel…[/ul][/li]I’ve checked without using PBO, and the reserved texture space seems to be correcly calculated by my code (I added bound checking to my buffers). I also use a GL_PACK_ALIGNMENT value of 1.
Does anyone have experience to share about using ‘correctly’ sized PBO to read texture contents ?
Edit: forgot to mention the use of Catalyst 10.4 on Radeon HD5770