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,12 +14,17 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
BlendFunc::BlendFunc()
|
||||
BlendFunc::BlendFunc():
|
||||
_source_factor(SRC_ALPHA),
|
||||
_destination_factor(ONE_MINUS_SRC_ALPHA)
|
||||
{
|
||||
_source_factor = SRC_ALPHA;
|
||||
_destination_factor = ONE_MINUS_SRC_ALPHA;
|
||||
}
|
||||
|
||||
BlendFunc::BlendFunc(GLenum source, GLenum destination):
|
||||
_source_factor(source),
|
||||
_destination_factor(destination)
|
||||
{
|
||||
}
|
||||
|
||||
BlendFunc::~BlendFunc()
|
||||
{
|
||||
|
||||
@@ -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