Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SbRenderEngineMode Class Reference

VSG extension Render engine mode. More...

#include <Inventor/SbRenderEngineMode.h>

Public Types

enum  RenderMode {
  OIV_UNKNOWN_RENDERING_MODE ,
  OIV_OPENINVENTOR_RENDERING ,
  OIV_OPENGL_COMPATIBILITY_RENDERING ,
  OIV_OPENGL_CORE_RENDERING
}
 Defines the list of supported render mode for a custom node. More...
 

Public Member Functions

 SbRenderEngineMode ()
 Default Constructor.
 
void setRenderMode (RenderMode renderMode)
 Set the RenderMode.
 
RenderMode getRenderMode () const
 Returns the current RenderMode.
 
void setChildrenInherit (bool isChildrenInherited)
 Indicates if any derived node should inherit this RenderMode.
 
bool isChildrenInherit () const
 Returns true is derived node should inherit this RenderMode.
 
bool isNotDefined () const
 Return true if the RenderMode has not be defined explicilty.
 

Static Public Member Functions

static void enableWarnings (bool flag)
 Enable or disable RenderEngineMode warning messages.
 
static void postInitWarning (const char *methodName)
 Post a warning related to Open Inventor 10 OpenGL support.
 

Detailed Description

VSG extension Render engine mode.

The render engine mode class indicates how a node performs its rendering. For example, the node can be using OpenGL calls or Open Inventor calls in order to achieve this task.

By default, a custom node is assumed to use the OpenGL compatibility-profile which means that it is allowed to use all OpenGL features even the ones that were deprecated in recent versions. If a node is only using core-profile OpenGL calls, it should give this information to the renderer using this enum.

However, it is strongly encouraged to avoid calling directly OpenGL methods to perform the rendering of a node and rely on Open Inventor instead. Using only Open Inventor calls is the optimal way as it allows harnessing a wide range of optimizations that are not available when using direct OpenGL calls.

Definition at line 48 of file SbRenderEngineMode.h.

Member Enumeration Documentation

◆ RenderMode

Defines the list of supported render mode for a custom node.

Enumerator
OIV_UNKNOWN_RENDERING_MODE 

Internally used to detect that a node did not set explicitly its RenderEngineMode by calling setRenderEngineMode method (This is the default).

If parent class has called setChildrenInherit(true), then this node type will inherit it. Else a warning will be issued and OIV_OPENINVENTOR_RENDERING will be used.

OIV_OPENINVENTOR_RENDERING 

The node uses only Open Inventor calls to perform its rendering (optimal way)

OIV_OPENGL_COMPATIBILITY_RENDERING 

The node relies on OpenGL fixed-function pipeline & deprecated features (OpenGL compatibility profile)

OIV_OPENGL_CORE_RENDERING 

The node uses OpenGL but only shader and modern features (OpenGL 3.3+ core profile)

Definition at line 59 of file SbRenderEngineMode.h.

Constructor & Destructor Documentation

◆ SbRenderEngineMode()

SbRenderEngineMode::SbRenderEngineMode ( )
inline

Default Constructor.

Definition at line 52 of file SbRenderEngineMode.h.

Member Function Documentation

◆ enableWarnings()

static void SbRenderEngineMode::enableWarnings ( bool  flag)
static

Enable or disable RenderEngineMode warning messages.

Default is true. Default value can be changed by using OIV_OPENGL_COMPATIBILITY_WARNING environment variable.

◆ getRenderMode()

RenderMode SbRenderEngineMode::getRenderMode ( ) const
inline

Returns the current RenderMode.

Definition at line 89 of file SbRenderEngineMode.h.

◆ isChildrenInherit()

bool SbRenderEngineMode::isChildrenInherit ( ) const
inline

Returns true is derived node should inherit this RenderMode.

Definition at line 103 of file SbRenderEngineMode.h.

◆ isNotDefined()

bool SbRenderEngineMode::isNotDefined ( ) const
inline

Return true if the RenderMode has not be defined explicilty.

Definition at line 109 of file SbRenderEngineMode.h.

◆ postInitWarning()

static void SbRenderEngineMode::postInitWarning ( const char *  methodName)
static

Post a warning related to Open Inventor 10 OpenGL support.

SbRenderEngineMode has not been set before SO__NODE_INIT_CLASS macro by a custom node.

◆ setChildrenInherit()

void SbRenderEngineMode::setChildrenInherit ( bool  isChildrenInherited)
inline

Indicates if any derived node should inherit this RenderMode.

Default is false

Definition at line 97 of file SbRenderEngineMode.h.

◆ setRenderMode()

void SbRenderEngineMode::setRenderMode ( RenderMode  renderMode)
inline

Set the RenderMode.

Default is OIV_UNKNOWN_RENDERING_MODE. If you specify your node type in the initClass() method, this method should be called before calling the SO_NODE_INIT_CLASS macro

Definition at line 83 of file SbRenderEngineMode.h.


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