Jump to content
Site Stability Read more... ×
  • Advertisement


This topic is now archived and is closed to further replies.


Trouble reading from the depth buffer

This topic is 6164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to read the value of the depth buffer back after rendering a scene. But the following doesn't prodcue the proper results. The values that are returned are all very similar. I only see outlines at the edge of objects(depth or no depth). Could this be because of of the percision of the depth buffer? or is there something wrong with the code bellow. I also tryed reading back the depth buffer using GL_Float and a float array but the values are very similar there too. Any help or advice is appreciated....Also I know reading back is slow and the speed hit doesnt concern me because i'm using this in an offline process. Thanks GLuint * depth = (GLuint*)calloc(width*height, sizeof(GLuint)); glReadPixels(0, 0, width, height, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, depth); [edited by - _walrus on December 4, 2002 3:45:59 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!