Hi, 

To start, I am grabbing the depthBuffer from the video card using the
readPixel (0, 0, width, height, GL_DEPTH_COMPONENT, GL_FLOAT) method. 

First, I will create a camera that will be positioned above the scene's
geometry and point straight down. 
I'd like to take the data from the depth buffer and transfer it into memory.

Next, using the data, I'd like to create a grid and translate all the depths
to height above geometry. 


If I have an osg::Image *depth_buffer, 
I believe that: depth_buffer->data() takes the depthbuffer from the video
card into memory. 
How can I store all the data into an array, iterate through it, and convert
the normalized values into meaningful height values?  
 

You'll need to write code to do this. A simple nested for loop should do the
trick.
   -Paul 
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to