Reading the Z-Buffer

Started by
0 comments, last by Mercury 19 years, 2 months ago
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
Advertisement
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