MeVisLab Resolution Independence API
SoShaderProgram Class Reference

Open Inventor shader program node. More...

#include <SoShaderProgram.h>

Inheritance diagram for SoShaderProgram:

Public Types

enum  GeometryInputType {
  POINTS_INPUT , LINES_INPUT , LINES_ADJACENCY_INPUT , TRIANGLES_INPUT ,
  TRIANGLES_ADJACENCY_INPUT
}
 
enum  GeometryOutputType { POINTS_OUTPUT , LINE_STRIP_OUTPUT , TRIANGLE_STRIP_OUTPUT }
 

Public Member Functions

 SoShaderProgram ()
 Constructor.
 
void GLRender (SoGLRenderAction *action) override
 Implements rendering.
 
SoGLShaderProgramgetGLShaderProgram ()
 

Static Public Member Functions

static void initClass ()
 Initialize class with runtime type system.
 

Public Attributes

SoMFShaderObject shaderObject
 Collects all vertex and fragment shaders.
 
SoMFUniformShaderParameter parameter
 Collects all shader parameters.
 
SoSFEnum geometryInputType
 Kind of primitives the geometry shader will accept as input.
 
SoSFEnum geometryOutputType
 Kind of primitives the geometry shader will output.
 
SoSFInt32 maxEmittedGeometryVertices
 Maximum number of points the geometry shader will emit.
 

Protected Member Functions

 ~SoShaderProgram () override
 Destructor.
 
void setup ()
 Initial setup of shader program.
 
SbBool isValidShaderObjects () const
 Returns 'TRUE' if all shader objects are valid.
 
void adaptParametersList (const SbPList &nextParameters)
 
void adaptShadersList (SbPList &prevShaders, const SbPList &nextShaders)
 
void scheduleShaderObjectRebuild ()
 
void injectSnippets ()
 
void updateOIVStateDependentParameters (SoState *state)
 Assigns Open Inventor state to some predefined uniform parameters.
 

Protected Attributes

SoGLInventorShaderProgram_glShaderProgram
 
SbPList _usedShaderParameters
 Shader parameters known via element.
 

Detailed Description

Open Inventor shader program node.

Definition at line 98 of file SoShaderProgram.h.

Member Enumeration Documentation

◆ GeometryInputType

Enumerator
POINTS_INPUT 
LINES_INPUT 
LINES_ADJACENCY_INPUT 
TRIANGLES_INPUT 
TRIANGLES_ADJACENCY_INPUT 

Definition at line 106 of file SoShaderProgram.h.

◆ GeometryOutputType

Enumerator
POINTS_OUTPUT 
LINE_STRIP_OUTPUT 
TRIANGLE_STRIP_OUTPUT 

Definition at line 113 of file SoShaderProgram.h.

Constructor & Destructor Documentation

◆ SoShaderProgram()

SoShaderProgram::SoShaderProgram ( )

Constructor.

◆ ~SoShaderProgram()

SoShaderProgram::~SoShaderProgram ( )
overrideprotected

Destructor.

Member Function Documentation

◆ adaptParametersList()

void SoShaderProgram::adaptParametersList ( const SbPList & nextParameters)
protected

◆ adaptShadersList()

void SoShaderProgram::adaptShadersList ( SbPList & prevShaders,
const SbPList & nextShaders )
protected

◆ getGLShaderProgram()

SoGLShaderProgram * SoShaderProgram::getGLShaderProgram ( )
inline

Definition at line 142 of file SoShaderProgram.h.

◆ GLRender()

void SoShaderProgram::GLRender ( SoGLRenderAction * action)
override

Implements rendering.

◆ initClass()

static void SoShaderProgram::initClass ( )
static

Initialize class with runtime type system.

◆ injectSnippets()

void SoShaderProgram::injectSnippets ( )
protected

◆ isValidShaderObjects()

SbBool SoShaderProgram::isValidShaderObjects ( ) const
protected

Returns 'TRUE' if all shader objects are valid.

◆ scheduleShaderObjectRebuild()

void SoShaderProgram::scheduleShaderObjectRebuild ( )
protected

◆ setup()

void SoShaderProgram::setup ( )
protected

Initial setup of shader program.

◆ updateOIVStateDependentParameters()

void SoShaderProgram::updateOIVStateDependentParameters ( SoState * state)
protected

Assigns Open Inventor state to some predefined uniform parameters.

Currently supported state depended uniforms are:

  • 'oiv_ViewPosition' vec4(x, y, z, (orthographic projection) ? 0 : 1)
  • 'oiv_NumEnabledLights' int

Member Data Documentation

◆ _glShaderProgram

SoGLInventorShaderProgram* SoShaderProgram::_glShaderProgram
protected

Definition at line 151 of file SoShaderProgram.h.

◆ _usedShaderParameters

SbPList SoShaderProgram::_usedShaderParameters
protected

Shader parameters known via element.

Definition at line 154 of file SoShaderProgram.h.

◆ geometryInputType

SoSFEnum SoShaderProgram::geometryInputType

Kind of primitives the geometry shader will accept as input.

Definition at line 126 of file SoShaderProgram.h.

◆ geometryOutputType

SoSFEnum SoShaderProgram::geometryOutputType

Kind of primitives the geometry shader will output.

Definition at line 129 of file SoShaderProgram.h.

◆ maxEmittedGeometryVertices

SoSFInt32 SoShaderProgram::maxEmittedGeometryVertices

Maximum number of points the geometry shader will emit.

Definition at line 132 of file SoShaderProgram.h.

◆ parameter

SoMFUniformShaderParameter SoShaderProgram::parameter

Collects all shader parameters.

Definition at line 123 of file SoShaderProgram.h.

◆ shaderObject

SoMFShaderObject SoShaderProgram::shaderObject

Collects all vertex and fragment shaders.

Definition at line 120 of file SoShaderProgram.h.


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