version 3.3

VRS::DepthBufferGL Class Reference

OpenGL Depth Buffer Settings and Operations. More...

#include <vrs/opengl/depthbuffergl.h>

Inheritance diagram for VRS::DepthBufferGL:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  Operations {
  Unused = 1 << 0, SetDepthMask = 1 << 1, SetDepthTest = 1 << 2, SetDepthFunction = 1 << 3,
  SetDepthRange = 1 << 4
}

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (Operations)
 DepthBufferGL (int operations=DepthBufferGL::Unused, bool depthMask=false, bool depthTest=true, GLenum depthFunction=GL_LESS, double minRange=0.0, double maxRange=1.0)
 DepthBufferGL (bool enabledForWriting, bool turnDepthTestOn=false)
 Convenience constructor for default configuration.
void enableOperation (int flagToBeAdded)
void disableOperation (int flagToBeRemoved)
int getOperations () const
void setDepthMask (bool onOff)
 Enable/ Disable Depth Mask.
bool getDepthMask () const
void setDepthTest (bool onOff)
bool getDepthTest () const
void setDepthFunction (GLenum funct)
 Sets the depth function used in depth test.
GLenum getDepthFunction () const
void setRange (double minValue, double maxValue)
void setRangeMin (double minValue)
void setRangeMax (double maxValue)
double getRangeMin () const
double getRangeMax () const
 Set/get the depth range.
 VRS_TYPEINFO (DepthBufferGL, MonoAttribute)
 VRS_SERIALIZABLE (DepthBufferGL)


Detailed Description

OpenGL Depth Buffer Settings and Operations.

This attribute allows you to specify OpenGL depth buffer operations. Multiple operations are possible for one attribute. All settings are activated when the attribute is pushed, and deactivated when the attribute is popped.

Functionality for clearing the depth buffer is provided by the FrameBufferGL attribute.


Member Enumeration Documentation

Enumerator:
Unused 
SetDepthMask 
SetDepthTest 
SetDepthFunction 
SetDepthRange 


Constructor & Destructor Documentation

VRS::DepthBufferGL::DepthBufferGL ( int  operations = DepthBufferGL::Unused,
bool  depthMask = false,
bool  depthTest = true,
GLenum  depthFunction = GL_LESS,
double  minRange = 0.0,
double  maxRange = 1.0 
)

VRS::DepthBufferGL::DepthBufferGL ( bool  enabledForWriting,
bool  turnDepthTestOn = false 
)

Convenience constructor for default configuration.

Configures GL_LESS, range [0,1] and activates depth test and depth mask operations.


Member Function Documentation

VRS::DepthBufferGL::VRS_SERIALIZABLE_CLASS_ENUM ( Operations   ) 

void VRS::DepthBufferGL::enableOperation ( int  flagToBeAdded  ) 

void VRS::DepthBufferGL::disableOperation ( int  flagToBeRemoved  ) 

int VRS::DepthBufferGL::getOperations (  )  const [inline]

void VRS::DepthBufferGL::setDepthMask ( bool  onOff  ) 

Enable/ Disable Depth Mask.

If enabled, the depth buffer is write potected.

bool VRS::DepthBufferGL::getDepthMask (  )  const [inline]

void VRS::DepthBufferGL::setDepthTest ( bool  onOff  ) 

bool VRS::DepthBufferGL::getDepthTest (  )  const [inline]

void VRS::DepthBufferGL::setDepthFunction ( GLenum  funct  ) 

Sets the depth function used in depth test.

Valid values are the OpenGL depth functions GL_LESS, GL_EQUAL, GL_GREATER, GL_LEQUAL, GL_GEQUAL. Remember to also enable the operation and activate the depth test, like this

 depthBuffer->setDepthFunction(GL_GREATER);
 depthBuffer->setDepthTest(true);
 depthBuffer->enableOperation(DepthBufferGL::SetDepthFunction);

GLenum VRS::DepthBufferGL::getDepthFunction (  )  const [inline]

void VRS::DepthBufferGL::setRange ( double  minValue,
double  maxValue 
)

void VRS::DepthBufferGL::setRangeMin ( double  minValue  ) 

void VRS::DepthBufferGL::setRangeMax ( double  maxValue  ) 

double VRS::DepthBufferGL::getRangeMin (  )  const [inline]

double VRS::DepthBufferGL::getRangeMax (  )  const [inline]

Set/get the depth range.

VRS::DepthBufferGL::VRS_TYPEINFO ( DepthBufferGL  ,
MonoAttribute   
)

VRS::DepthBufferGL::VRS_SERIALIZABLE ( DepthBufferGL   ) 


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:20 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact