Aded extra constructors to BlendFunc and Depth to help set them up convieniently.
Added a background quad to osghud.
This commit is contained in:
@@ -14,16 +14,14 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
Depth::Depth()
|
||||
Depth::Depth(Function func,double zNear, double zFar,bool writeMask):
|
||||
_func(func),
|
||||
_zNear(zNear),
|
||||
_zFar(zFar),
|
||||
_depthWriteMask(writeMask)
|
||||
{
|
||||
_func = LESS;
|
||||
_depthWriteMask = true;
|
||||
|
||||
_zNear = 0.0;
|
||||
_zFar = 1.0;
|
||||
}
|
||||
|
||||
|
||||
Depth::~Depth()
|
||||
{
|
||||
}
|
||||
@@ -31,7 +29,7 @@ Depth::~Depth()
|
||||
void Depth::apply(State&) const
|
||||
{
|
||||
glDepthFunc((GLenum)_func);
|
||||
glDepthMask((GLboolean)_depthWriteMask);
|
||||
glDepthRange(_zNear,_zFar);
|
||||
glDepthMask((GLboolean)_depthWriteMask);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user