Sign in to follow this  

Depth_test Enabling renders nothing with LEQUAL or LESS (GL3+)

Recommended Posts

Hello all,

I'm having an awkward problem and haven't been able to solve this yet.

I am rendering a basic random point cloud using VAO's, VBO+IBO, glsl 1.5, etc.

The problem is that i can render everything just fine when disabling DEPTH_TEST or setting DepthFunc to GEQUAL or GREATER. this is not what i wanted. i need the depth buffer to be using LESS or LEQUAL.

anyone have any idea why this could be happening?

When using GREATER the point cloud shows up on screen (not sorted correctly but thats because of the depth func, it's inverted).
When using LESS or LEQUAL nothing shows up on screen..

here's my render states:

[CODE] glFrontFace( GL_CCW );
glCullFace( GL_BACK );
glEnable( GL_CULL_FACE );

glDisable( GL_BLEND );

glDepthFunc( GL_LEQUAL );
glDepthMask( true );
glEnable( GL_DEPTH_TEST );
[/CODE] Edited by mrmurder

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this