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 } |
Public Member Functions | |
SbRenderEngineMode () | |
void | setRenderMode (RenderMode renderMode) |
RenderMode | getRenderMode () const |
void | setChildrenInherit (bool isChildrenInherited) |
bool | isChildrenInherit () const |
bool | isNotDefined () const |
Static Public Member Functions | |
static void | enableWarnings (bool flag) |
static void | postInitWarning (const char *methodName) |
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.
Defines the list of supported render mode for a custom node.
SbRenderEngineMode::SbRenderEngineMode | ( | ) | [inline] |
Default Constructor.
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.
RenderMode SbRenderEngineMode::getRenderMode | ( | ) | const [inline] |
Returns the current RenderMode.
bool SbRenderEngineMode::isChildrenInherit | ( | ) | const [inline] |
Returns true is derived node should inherit this RenderMode.
bool SbRenderEngineMode::isNotDefined | ( | ) | const [inline] |
Return true if the RenderMode has not be defined explicilty.
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.
void SbRenderEngineMode::setChildrenInherit | ( | bool | isChildrenInherited | ) | [inline] |
Indicates if any derived node should inherit this RenderMode.
Default is false
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