Click or drag to resize
SoGLCacheContextElement Class

Note: This API is now obsolete.

Class: SoCacheContextElement.

Inheritance Hierarchy

Namespace: OIV.Inventor.Elements
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
[ObsoleteAttribute("See documentation for more details")]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public class SoGLCacheContextElement : SoElement

The SoGLCacheContextElement type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAreMipMapsFast

true if mip-mapped textures are known to be fast.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberExtSupported

This routine is pretty quick.

Public methodStatic memberGet

Gets the current context.

Public methodStatic memberGetClassStackIndex Obsolete.

Returns the stack id for this element.

Public methodStatic memberGetExtID

Methods to quickly figure out if an OpenGL extension is available at run-time.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodStatic memberGetIsRemoteRendering
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsCompileModeFaster

true if we think GL_COMPILE is faster than GL_COMPILE_AND_EXECUTE.

Public methodPop

Pops element.

(Inherited from SoElement.)
Public methodPush

Pushes element.

(Inherited from SoElement.)
Public methodStatic memberResetAutoCacheBits

Used by Separators to set/reset the auto-caching bits.

Public methodStatic memberSet

Sets the current context.

Public methodStatic memberSetAutoCacheBits

Used by Separators to set/reset the auto-caching bits.

Public methodStatic memberShouldAutoCache(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):

Public methodStatic memberShouldAutoCache(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):

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

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.

See Also