PDA

View Full Version : Problems with glGetTexImage() & 3D textures on ATI Catalyst.



Sergey K.
09-14-2006, 06:02 AM
If i read back 3D texture via glGetTexImage() call the data returned is bad. Is it a bug or actually is it possible somehow to read 3D textures out of the GPU?

k_szczech
09-14-2006, 06:28 AM
How does your call to glTexImage look like?
How does your call to glGetTexImage look like?

Sergey K.
09-14-2006, 11:01 AM
void clGL3DTexture::TexImage(Lenum InternalFormat,
Luint Width, Luint Height, Luint Depth,
Lenum Format,
bool Float,
const Lubyte* RawPixelData) const
{
glTexImage3D( GetTextureTarget(),
0,
InternalFormat,
Width,
Height,
Depth,
0,
Format,
Float ? GL_FLOAT : GL_UNSIGNED_BYTE,
RawPixelData
);
}and


void iGLTexturesSerializer::GetTexImage(Lenum Format, bool Float, Lubyte* Image) const
{
CheckRendererError();


/*
NOTE: ATI Catalyst 6.6 has bugs with glGetTexImage() for 3D textures
*/
glGetTexImage( GetTextureTarget(),
0,
Format,
(Float) ? GL_FLOAT : GL_UNSIGNED_BYTE,
Image
);

CheckRendererError();
}Complete source code could be found here: http://www.linderdaum.com/Downloads/Tutorials.zip

sqrt[-1]
09-14-2006, 07:29 PM
GLIntercept saves 3D textures, so you could do a frame grab and see if the 3D textures are the same.
(http://glintercept.nutty.org/)

Sergey K.
09-25-2006, 01:13 AM
Checked with GLIntercept. Seems that all z-planes of a 3D texture returned contain same pixels as z-plane of 0. Driver bug?