Write Image To Depth Buffer: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
Line 1: Line 1:
Use the glDrawPixels() command, with the format parameter set to GL_DEPTH_COMPONENT. You may want to mask off the color buffer when you do this, with a call to glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); .
Use the glDrawPixels() command, with the format parameter set to GL_DEPTH_COMPONENT. You may want to mask off the color buffer when you do this, with a call to glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); .
You can read about depth buffer precision at http://www.opengl.org/wiki/Common_Mistakes#Depth_Buffer_Precision


[[Category:Depth Buffering]]
[[Category:Depth Buffering]]

Latest revision as of 05:02, 27 April 2011

Use the glDrawPixels() command, with the format parameter set to GL_DEPTH_COMPONENT. You may want to mask off the color buffer when you do this, with a call to glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); .

You can read about depth buffer precision at http://www.opengl.org/wiki/Common_Mistakes#Depth_Buffer_Precision