Jump to content
  • Advertisement

Archived

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

_walrus

Trouble reading from the depth buffer

This topic is 5735 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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!