glReadPixels is the function to use. 
 
You say the function is not giving you the correct depth values, in what way are they not correct... the value in a depth buffer is between 0-1, where 0 is the near clip and 1 if the far clip, not this is non linear and more precision is given to values closer to the near clip plane
 
Steve Baker has a nice page on this http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html
 
 
 
 

Best Regards

 

Gordon

__________________________________________________________

Gordon Tomlinson
Email         : gordon.tomlinson @ overwatch.com
YIM/AIM
       : Gordon3dBrit
MSN IM        : Gordon3dBrit @ 3dscenegraph.com

__________________________________________________________

"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura

 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Aditi
Sent: Monday, July 03, 2006 10:31 AM
To: [email protected]
Subject: [osg-users] Problem Regarding glReadPixels

Hello all,
Can anyone tell me the osg counterpart for glReadPixels? In my application, i need to read back depthvalues from the framebuffer . I am currently using glReadPixels function  but it is not giving the correct depth values. someone please lemme know how to read back depthvalues from framebuffer :-)


Thanks
Aditi
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to