#include <lvt/State.h>
Inheritance diagram for DepthTest:
The DepthTest class controls both depth testing and writes to the depth buffer. Disabling the class (via State::Disable) will disable both depth testing and depth writes. To disable depth testing, but leave depth writes enabled, set the depth test function to GL_ALWAYS:
Public Member Functions | |
DepthTest (GLenum func=GL_LESS, bool doWrites=true) | |
Default constructor. | |
bool | DepthWritesEnabled () const |
Returns true if Depth buffer writes are enabled. | |
void | DisableDepthWrites () |
Disables writes to the depth buffer. | |
void | EnableDepthWrites () |
Enables writes to the depth buffer. | |
virtual void | Render () |
Activates the State. | |
GLenum | SetDepthFunc (GLenum func) const |
Returns the current depth test function. | |
void | SetDepthFunc (GLenum func) |
Sets the depth test. |
|
Default constructor.
|
|
Returns true if Depth buffer writes are enabled.
|
|
Disables writes to the depth buffer.
|
|
Enables writes to the depth buffer.
|
|
Activates the State. If the State is enabled, the corresponding piece of OpenGL state is enabled and its value is set, if appropriate. If the State object is disabled, the corresponding piece of OpenGL state is disabled. Implements State. |
|
Returns the current depth test function.
|
|
Sets the depth test.
|