View Full Version : have you some executable soure code of reading the z-buffer value?
02-19-2004, 05:59 PM
i have try all the ways i can find,but i still can not find the problem
thanks a lot
02-19-2004, 08:16 PM
If that doesn't work for you, it is doubtful that your z buffer contains what you expected.
I've seen in your other thread that you're using a scenegraph. You might have to tell the scenegraph to render the objects first.
Ordering hazards between OpenGL functions don't exist, but they do exist if you mix OpenGL with some layered library.
OpenGL itself will "know" that it must finish rendering before it can properly do ReadPixels. The scenegraph doesn't know anything about ReadPixels, so it still may have some geometry stored in its buffers that isn't rendered.
Btw, don't create multiple threads for basically the same topic. It can become confusing and is regarded as impolite.
02-20-2004, 01:38 AM
Small nitpick. GL_FLOAT is flexible but may not be the best performing destination format here. Use GL_UNSIGNED_INT speedier readbacks.
02-20-2004, 02:39 AM
Originally posted by Relic:
Small nitpick. GL_FLOAT is flexible but may not be the best performing destination format here. Use GL_UNSIGNED_INT speedier readbacks.Last time I checked GL_FLOAT was the fastest format for Radeon cards. YMMV, of course.
02-20-2004, 08:01 PM
The problem has been resolved. Thanks for your help
I have found the problem, it is not the reading z-buffer function, but the camera i used.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.