SoGLCacheContextElement Class |
Note: This API is now obsolete.
Class: SoCacheContextElement.
Namespace: OIV.Inventor.Elements
The SoGLCacheContextElement type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | AreMipMapsFast | true if mip-mapped textures are known to be fast. |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | ExtSupported | This routine is pretty quick. |
![]() ![]() | Get | Gets the current context. |
![]() ![]() | GetClassStackIndex | Obsolete. Returns the stack id for this element. |
![]() ![]() | GetExtID | Methods to quickly figure out if an OpenGL extension is available at run-time. |
![]() | GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) |
![]() ![]() | GetIsRemoteRendering | |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | IsCompileModeFaster | true if we think GL_COMPILE is faster than GL_COMPILE_AND_EXECUTE. |
![]() | Pop | Pops element. |
![]() | Push | Pushes element. |
![]() ![]() | ResetAutoCacheBits | Used by Separators to set/reset the auto-caching bits. |
![]() ![]() | Set | Sets the current context. |
![]() ![]() | SetAutoCacheBits | Used by Separators to set/reset the auto-caching bits. |
![]() ![]() | ShouldAutoCache(SoState, SoGLCacheContextElementAutoCacheModes) | Obsolete. Called by nodes to say that they should/shouldn't be auto-cached (pass true if should, false if shouldn't, don't call this method at all if the node doesn't care): |
![]() ![]() | ShouldAutoCache(SoState, Int32) | Called by nodes to say that they should/shouldn't be auto-cached (pass true if should, false if shouldn't, don't call this method at all if the node doesn't care): |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Element that stores the cache context. There is a method on the render action to set this; if you are not rendering onto multiple displays, you will not need to set this (assuming that caches are shareable between different windows on the same display, which is true of GLX).
This element should be set before traversal starts, and must not be changed during traversal (you'll get a debug error if a node tries to set the cache context during traversal).
This method also has API for quickly finding out whether or not OpenGL extensions are supported. Code that uses extension "foo" should look something like:
#ifdef GL_EXT_foo static int fooExtInt = -1; if (fooExtInt == -1) fooExtInt = SoGLCacheContextElement.getExtID("GL_EXT_foo"); if (SoGLCacheContextElement.extSupported(state, fooExtInt)) { glFoo(... make extension foo calls...); } else { #endif Extension not supported, make regular GL calls #ifdef GL_EXT_foo } #endif
Arranging the code that way ensures that it both compiles on systems that don't support the extension AND will run on any OpenGL-capable machine, even if the application displays on multiple displays (only some of which may support the extension).Obsoletesince Open Inventor 9620 SoGLCacheContextElement is no longer supported. See section http://oivdoc96.vsg3d.com/content/compatibility-notes-4#Deprecation of the Reference Manual.