• Advertisement

Archived

This topic is now archived and is closed to further replies.

Z-buffering

This topic is 6287 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How''s Z buffering implemented - is it using opengl commands? sample code anyone? Cheers

Share this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites

  • Advertisement