cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

azverkan
Journeyman III

OpenGL bug in glCopyTexImage2D

Quantizing depth texture information

Right now if you create a GL_DEPTH_COMPONENT24 texture and use glCopyTexImage2D with GL_DEPTH_COMPONENT to fill that texture from a 24bit depth buffer, only the top 16bits of the 24bit texture get copied.

Right now you have to you have to explicitly say GL_DEPTH_COMPONENT24 to copy all 24bits into the destination texture.  This seems like incorrect behavior (and differs from what the NVidia OpenGL implementation does).

Example:

 

glBindTexture(GL_TEXTURE_2D, 1);

glTextureParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);

glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, w, h, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);

glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, w, h, 0);

 

Workaround:

 

glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, 0, 0, w, h, 0);

 

0 Likes
3 Replies
avk
Adept III

Maybe you should post your problem at email for GPU-related developer inquiries?

0 Likes

Posted an email to the devrel@ati.com but I haven't received any response yet.

Are there any another forums or lists for reporting OpenGL bugs?

 

0 Likes

Not sure. Well, I hope that you'll get an answer sooner or later.

0 Likes