OpenSceneGraph/src/osg/Depth.cpp

26 lines
314 B
C++
Raw Normal View History

2001-09-20 05:19:47 +08:00
#include <osg/Depth>
using namespace osg;
Depth::Depth()
{
_func = LESS;
_depthWriteMask = true;
_zNear = 0.0;
_zFar = 1.0;
}
Depth::~Depth()
{
}
void Depth::apply(State&) const
{
glDepthFunc((GLenum)_func);
glDepthMask((GLboolean)_depthWriteMask);
glDepthRange(_zNear,_zFar);
}