Probably for fastest results, you could take the Image and write it out as a TIFF file, for example: osgDB::writeImageFile( image, "filename.tif" ). Then view the resulting TIFF file. Depth values are unsigned ints in the range 0 to (2^32)-1. If you want to write software to display it, I've rendered this in the past as a grey scale image. Using 8 bits per pixel. Right shift each value 24 bits to quantize down to 8 bits. The image produced shows most distant pixels as white or near-white, and closer pixels as black or near-black. Not sure why you're using a .txt file here; on Windows, that's for readable text, not binary data. If you need more help than that, please be more specific about what you're trying to do. -Paul
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Abdallah Deeb Sent: Wednesday, June 13, 2007 1:05 PM To: osg-users@openscenegraph.net Subject: [osg-users] (no subject) hello in fact i have a problem in my code all i want to do is to read the Depth buffer and then store them on a .txt file i create the camera than i attach an image to it than i use image->readpixels(..) than i store image->data() in a .txt file my problem is image->data() is unsigned char * i dont know how to deal with : after i saved the values in .txt file i tried to draw this values in matlab for example or any other software but it give the wrong image "something unsual ". can anyone help plz ?if u have any link or a code that help to know how to store and draw with image->data() where data() represent the values of GL_DEPTH_COMPONENT(depth buffer) and not GL_RGB. _____ Live Earth is coming. Learn more about the hottest summer event - only on MSN. Check it out! <http://liveearth.msn.com?source=msntaglineliveearthwlm>
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/