Click or drag to resize
SoSceneManagerRender Method

Applies an OIV.Inventor.Actions.SoGLRenderAction to the scene graph managed here.

Namespace: OIV.Inventor
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public void Render()
Exceptions
ExceptionCondition
[!:System.InvalidOperationException]

No OpenGL context active found.

Remarks

Note that this method just applies an OIV.Inventor.Actions.SoGLRenderAction that traverses the scene graph and makes the necessary rendering calls for each node. It is not the same as calling the render method on an Open Inventor render area or viewer object. The viewer's render method will typically do pre-rendering operations like adjusting the near/far clip planes, as well as post-rendering operations like calling "swap buffers" to make the rendered content visible. Also it is possible to call a viewer's render method without explicitly making an OpenGL render context current (the viewer takes care of that).

When calling this method, the application is responsible for providing a current OpenGL render context that is known to Open Inventor through an OIV.Inventor.Devices.SoGLContext object. If there is no current OpenGL render context, Open Inventor may throw an exception or crash, depending on the API language and system environment.

  • If the application is using an Open Inventor render area or viewer and wants to render in that window, there may not be an OpenGL render context current. However the viewer's render context can be made current by calling the viewer's bindNormalContext() method. Call the viewer's unbindNormalContext() method after calling OIV.Inventor.SoSceneManager.Render().

  • This method is more likely to be used in cases where there is no Open Inventor render area or viewer. For example when integrating Open Inventor rendering in an OpenGL application. If the application has its own OpenGL render context that is already current, you can call the static OIV.Inventor.Devices.SoGLContext method getCurrent(true) to get an OIV.Inventor.Devices.SoGLContext object that wraps the current context. Then call bind and unbind on the returned object. (Note that this method will return null if there is no current context.)

See Also