Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoDepthBufferElement Class Reference

VSG extension Stores the current depth buffer parameters. More...

#include <Inventor/elements/SoDepthBufferElement.h>

+ Inheritance diagram for SoDepthBufferElement:

Public Types

enum  DepthWriteFunction {
  NEVER = SbEnums::COMP_FUNC_NEVER ,
  LESS = SbEnums::COMP_FUNC_LESS ,
  EQUAL = SbEnums::COMP_FUNC_EQUAL ,
  LEQUAL = SbEnums::COMP_FUNC_LESS_EQUAL ,
  GREATER = SbEnums::COMP_FUNC_GREATER ,
  NOTEQUAL = SbEnums::COMP_FUNC_NOT_EQUAL ,
  GEQUAL = SbEnums::COMP_FUNC_GREATER_EQUAL ,
  ALWAYS = SbEnums::COMP_FUNC_ALWAYS
}
 Depth function mode as defined by OpenGL. More...
 

Public Member Functions

virtual void print (FILE *fp) const
 Prints element (for debugging).
 
virtual void push (SoState *state)
 Override push() method to keep GL up to date.
 
virtual void pop (SoState *state, const SoElement *prevTopElement)
 Override pop() method to keep GL up to date.
 
- Public Member Functions inherited from SoElement
virtual SoType getTypeId () const
 Returns type identifier for element instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static int getClassStackIndex ()
 Returns the stack id for this element.
 
static void set (SoState *state, const SbBool test, const SbBool write, const DepthWriteFunction function, const SbVec2f range)
 Sets the depth buffer parameters.
 
static void set (SoState *state, SoDepthBuffer *depthBuffer, const SbBool test, const SbBool write, const DepthWriteFunction function, const SbVec2f range)
 Sets the depth buffer parameters.
 
static void get (SoState *state, SbBool &test, SbBool &write, DepthWriteFunction &function, SbVec2f &range)
 Returns current depth buffer parameters.
 
- Static Public Member Functions inherited from SoElement
static SoType getClassTypeId ()
 Returns type identifier for SoElement class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

VSG extension Stores the current depth buffer parameters.

This element stores the current depth buffer parameters used for rendering, including:

  • Depth buffer test enabled,
  • Depth buffer writing enabled,
  • Depth buffer range, and
  • Depth comparison function.

SEE ALSO

SoDepthBuffer

Definition at line 50 of file SoDepthBufferElement.h.

Member Enumeration Documentation

◆ DepthWriteFunction

Depth function mode as defined by OpenGL.

Enumerator
NEVER 

Never passes.

LESS 

Passes if the incoming depth value is less than the stored depth value.

EQUAL 

Passes if the incoming depth value is equal to the stored depth value.

LEQUAL 

Passes if the incoming depth value is less than or equal to the stored depth value.

GREATER 

Passes if the incoming depth value is greater than the stored depth value.

NOTEQUAL 

Passes if the incoming depth value is not equal to the stored depth value.

GEQUAL 

Passes if the incoming depth value is greater than or equal to the stored depth value.

ALWAYS 

Always passes.

Definition at line 58 of file SoDepthBufferElement.h.

Member Function Documentation

◆ get()

static void SoDepthBufferElement::get ( SoState state,
SbBool test,
SbBool write,
DepthWriteFunction function,
SbVec2f range 
)
static

Returns current depth buffer parameters.

◆ getClassStackIndex()

static int SoDepthBufferElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoDepthBufferElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ pop()

virtual void SoDepthBufferElement::pop ( SoState state,
const SoElement prevTopElement 
)
virtual

Override pop() method to keep GL up to date.

Reimplemented from SoElement.

◆ print()

virtual void SoDepthBufferElement::print ( FILE *  fp) const
virtual

Prints element (for debugging).

Reimplemented from SoElement.

◆ push()

virtual void SoDepthBufferElement::push ( SoState state)
virtual

Override push() method to keep GL up to date.

Reimplemented from SoElement.

◆ set() [1/2]

static void SoDepthBufferElement::set ( SoState state,
const SbBool  test,
const SbBool  write,
const DepthWriteFunction  function,
const SbVec2f  range 
)
static

Sets the depth buffer parameters.

This method will (indirectly) call glDepthMask, glDepthFunc, glDepthRange with the new values

◆ set() [2/2]

static void SoDepthBufferElement::set ( SoState state,
SoDepthBuffer depthBuffer,
const SbBool  test,
const SbBool  write,
const DepthWriteFunction  function,
const SbVec2f  range 
)
static

Sets the depth buffer parameters.

This method will (indirectly) call glDepthMask, glDepthFunc, glDepthRange with the new values


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