24#ifndef _SO_DEPTH_BUFFER_ELEMENT_
25#define _SO_DEPTH_BUFFER_ELEMENT_
27#include <Inventor/SbBasic.h>
28#include <Inventor/SbVec.h>
29#include <Inventor/elements/SoSubElement.h>
30#include <Inventor/SbEnums.h>
60 NEVER = SbEnums::COMP_FUNC_NEVER,
62 LESS = SbEnums::COMP_FUNC_LESS,
64 EQUAL = SbEnums::COMP_FUNC_EQUAL,
66 LEQUAL = SbEnums::COMP_FUNC_LESS_EQUAL,
72 GEQUAL = SbEnums::COMP_FUNC_GREATER_EQUAL,
74 ALWAYS = SbEnums::COMP_FUNC_ALWAYS
99 virtual void print(FILE *fp)
const;
114 virtual void init(
SoState *state);
124 virtual SoElement* copyMatchInfo()
const;
130 static void initClass();
133 static void exitClass();
138 static void setWriteMask(
SoState* state,
const SbBool writeMask);
163 static bool depthTest(
SoState* state,
double currentDepth,
double newDepth);
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
static void set(SoState *state, SoDepthBuffer *depthBuffer, const SbBool test, const SbBool write, const DepthWriteFunction function, const SbVec2f range)
Sets the depth buffer parameters.
DepthWriteFunction
Depth function mode as defined by OpenGL.
@ NOTEQUAL
Passes if the incoming depth value is not equal to the stored depth value.
@ EQUAL
Passes if the incoming depth value is equal to the stored depth value.
@ LESS
Passes if the incoming depth value is less than the stored depth value.
@ GREATER
Passes if the incoming depth value is greater than the stored depth value.
@ GEQUAL
Passes if the incoming depth value is greater than or equal to the stored depth value.
@ LEQUAL
Passes if the incoming depth value is less than or equal to the stored depth value.
virtual void print(FILE *fp) const
Prints element (for debugging).
virtual void push(SoState *state)
Override push() method to keep GL up to date.
static void get(SoState *state, SbBool &test, SbBool &write, DepthWriteFunction &function, SbVec2f &range)
Returns current depth buffer parameters.
static void set(SoState *state, const SbBool test, const SbBool write, const DepthWriteFunction function, const SbVec2f range)
Sets the depth buffer parameters.
virtual void pop(SoState *state, const SoElement *prevTopElement)
Override pop() method to keep GL up to date.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Depth buffer par...
Abstract base class for all state elements.