Hi Sam, On 12 December 2011 22:35, Sam Corbett-Davies <samcorbettdav...@gmail.com> wrote: > I am working on an augmented reality project using the Kinect. I am trying to > occlude geometry based on the depth image produced by Kinect. > To do this I thought I'd write the depth image (after scaling the depth > values appropriately) to the depth buffer. > It looks as though I'd use glDrawPixels() with GL_DEPTH_COMPONENT if I was > doing it in OpenGL, but how do I achieve this in OSG? > > I'm also open to a better way of using the Kinect to occlude geometry if > anyone has any ideas.
Using an osg::Image attached osg::Texture2D, then render this texture to a full window quad and have a shader read the texture and write the result to the depth buffer using a shader that sets the gl_FragDepth. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org