Reading the Z-Buffer
Greetings,
I am trying to impliment "Laser Range Finding" in my Opengl program. In other words I should be able to point at any pixel and get a value for distance from the viewpoint. Is there a way I can read from the z-buffer to get this info? I'd rather avoid costly poly-intersect computations.
Thanks,
Ryback
Quote:
You can read the contents of the color, depth, and stencil buffers with the glReadPixels() command. Likewise, glDrawPixels() and glCopyPixels() are available for sending images to and BLTing images around in the OpenGL buffers.
Rasterization and Operations on the Framebuffer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement