Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SbRenderEngineMode.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM 2015)
22**=======================================================================*/
23
24#ifndef SB_RENDER_ENGINE_MODE_H_
25#define SB_RENDER_ENGINE_MODE_H_
26
27#include <Inventor/SbBase.h>
28
49{
50public:
53 :m_renderMode(OIV_UNKNOWN_RENDERING_MODE), m_isChildrenInherited(false)
54 {}
55
76
83 void setRenderMode(RenderMode renderMode)
84 {
85 m_renderMode = renderMode;
86 }
87
90 {
91 if ( isNotDefined() )
93 return m_renderMode;
94 }
95
97 void setChildrenInherit(bool isChildrenInherited)
98 {
99 m_isChildrenInherited = isChildrenInherited;
100 }
101
103 bool isChildrenInherit() const
104 {
105 return m_isChildrenInherited;
106 }
107
109 bool isNotDefined() const
110 {
111 return (m_renderMode == OIV_UNKNOWN_RENDERING_MODE);
112 }
113
118 static void enableWarnings(bool flag);
119
124 static void postInitWarning(const char *methodName);
125
126private:
127 RenderMode m_renderMode;
128 bool m_isChildrenInherited;
129 static int s_isWarningsEnabled;
130};
131
132
133#endif // SB_RENDER_ENGINE_MODE_H_
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Render engine mo...
RenderMode
Defines the list of supported render mode for a custom node.
@ OIV_OPENINVENTOR_RENDERING
The node uses only Open Inventor calls to perform its rendering (optimal way)
@ OIV_UNKNOWN_RENDERING_MODE
Internally used to detect that a node did not set explicitly its RenderEngineMode by calling setRende...
@ 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)
bool isNotDefined() const
Return true if the RenderMode has not be defined explicilty.
SbRenderEngineMode()
Default Constructor.
void setChildrenInherit(bool isChildrenInherited)
Indicates if any derived node should inherit this RenderMode.
RenderMode getRenderMode() const
Returns the current RenderMode.
static void enableWarnings(bool flag)
Enable or disable RenderEngineMode warning messages.
bool isChildrenInherit() const
Returns true is derived node should inherit this RenderMode.
static void postInitWarning(const char *methodName)
Post a warning related to Open Inventor 10 OpenGL support.
void setRenderMode(RenderMode renderMode)
Set the RenderMode.