Z-buffering
How''s Z buffering implemented - is it using opengl commands? sample code anyone?
Cheers
glEnable(GL_DEPTH_TEST); //that''s it you got z-buffering. !!
glDepthFunc(GL_LESS) //this is by default, so don''t worry about it.
if you want your depth buffer to act so that the nearer objects (rather then the farther objects) don''t get drawn then pass the above GL_GREATER. you get the idea...
glDepthFunc(GL_LESS) //this is by default, so don''t worry about it.
if you want your depth buffer to act so that the nearer objects (rather then the farther objects) don''t get drawn then pass the above GL_GREATER. you get the idea...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement