Open Inventor Release 2023.2.2
 
Loading...
Searching...
No Matches
SoBlendElement Class Reference

VSG extension Stores the current blending mode and parameters. More...

#include <Inventor/elements/SoBlendElement.h>

+ Inheritance diagram for SoBlendElement:

Classes

struct  BlendElementParameters
 BlendElementParameters packages all the different blending parameters. More...
 

Public Types

enum  BlendFactor {
  ZERO = SbEnums::BLEND_ZERO ,
  ONE = SbEnums::BLEND_ONE ,
  SRC_COLOR = SbEnums::BLEND_SRC_COLOR ,
  ONE_MINUS_SRC_COLOR = SbEnums::BLEND_ONE_MINUS_SRC_COLOR ,
  DST_COLOR = SbEnums::BLEND_DST_COLOR ,
  ONE_MINUS_DST_COLOR = SbEnums::BLEND_ONE_MINUS_DST_COLOR ,
  SRC_ALPHA = SbEnums::BLEND_SRC_ALPHA ,
  ONE_MINUS_SRC_ALPHA = SbEnums::BLEND_ONE_MINUS_SRC_ALPHA ,
  DST_ALPHA = SbEnums::BLEND_DST_ALPHA ,
  ONE_MINUS_DST_ALPHA = SbEnums::BLEND_ONE_MINUS_DST_ALPHA ,
  CONSTANT_COLOR = SbEnums::BLEND_CONSTANT_COLOR ,
  ONE_MINUS_CONSTANT_COLOR = SbEnums::BLEND_ONE_MINUS_CONSTANT_COLOR ,
  CONSTANT_ALPHA = SbEnums::BLEND_CONSTANT_ALPHA ,
  ONE_MINUS_CONSTANT_ALPHA = SbEnums::BLEND_ONE_MINUS_CONSTANT_ALPHA ,
  SRC_ALPHA_SATURATE = SbEnums::BLEND_SRC_ALPHA_SATURATE ,
  SRC1_COLOR = SbEnums::BLEND_SRC1_COLOR ,
  ONE_MINUS_SRC1_COLOR = SbEnums::BLEND_ONE_MINUS_SRC1_COLOR ,
  SRC1_ALPHA = SbEnums::BLEND_SRC1_ALPHA ,
  ONE_MINUS_SRC1_ALPHA = SbEnums::BLEND_ONE_MINUS_SRC1_ALPHA
}
 BlendFactor as defined by OpenGL's glBlendFunc. More...
 
enum  BlendEquation {
  FUNC_ADD = SbEnums::BLEND_FUNC_ADD ,
  FUNC_SUBTRACT = SbEnums::BLEND_FUNC_SUBTRACT ,
  FUNC_REVERSE_SUBTRACT = SbEnums::BLEND_FUNC_REVERSE_SUBTRACT ,
  MIN = SbEnums::BLEND_FUNC_MIN ,
  MAX = SbEnums::BLEND_FUNC_MAX
}
 Blend Equation as defined by OpenGL's glBlendEquation. 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 BlendElementParameters &parameters)
 Sets the blending parameters.
 
static void setBlending (SoState *state, bool enabled)
 Enable or disable blending.
 
static void setFunction (SoState *state, const BlendFactor source, const BlendFactor destination)
 Sets the blending function.
 
static void get (SoState *state, BlendElementParameters &parameter)
 Retrieves the current blending 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 blending mode and parameters.

This element stores the current blending mode, including source and target factors for RGB and Alpha values, equation and color.

Definition at line 38 of file SoBlendElement.h.

Member Enumeration Documentation

◆ BlendEquation

Blend Equation as defined by OpenGL's glBlendEquation.

Enumerator
FUNC_ADD 
FUNC_SUBTRACT 
FUNC_REVERSE_SUBTRACT 
MIN 
MAX 

Definition at line 72 of file SoBlendElement.h.

◆ BlendFactor

BlendFactor as defined by OpenGL's glBlendFunc.

Enumerator
ZERO 
ONE 
SRC_COLOR 
ONE_MINUS_SRC_COLOR 
DST_COLOR 
ONE_MINUS_DST_COLOR 
SRC_ALPHA 
ONE_MINUS_SRC_ALPHA 
DST_ALPHA 
ONE_MINUS_DST_ALPHA 
CONSTANT_COLOR 
ONE_MINUS_CONSTANT_COLOR 
CONSTANT_ALPHA 
ONE_MINUS_CONSTANT_ALPHA 
SRC_ALPHA_SATURATE 
SRC1_COLOR 
ONE_MINUS_SRC1_COLOR 
SRC1_ALPHA 
ONE_MINUS_SRC1_ALPHA 

Definition at line 46 of file SoBlendElement.h.

Member Function Documentation

◆ get()

static void SoBlendElement::get ( SoState state,
BlendElementParameters parameter 
)
static

Retrieves the current blending parameters.

◆ getClassStackIndex()

static int SoBlendElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoBlendElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ pop()

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

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

Reimplemented from SoElement.

◆ print()

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

Prints element (for debugging).

Reimplemented from SoElement.

◆ push()

virtual void SoBlendElement::push ( SoState state)
virtual

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

Reimplemented from SoElement.

◆ set()

static void SoBlendElement::set ( SoState state,
const BlendElementParameters parameters 
)
static

Sets the blending parameters.

◆ setBlending()

static void SoBlendElement::setBlending ( SoState state,
bool  enabled 
)
static

Enable or disable blending.

◆ setFunction()

static void SoBlendElement::setFunction ( SoState state,
const BlendFactor  source,
const BlendFactor  destination 
)
static

Sets the blending function.

Convenience function to shorten code only setting the blending function withput separating components.


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