public class SoGLCacheContextElement extends SoElement
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).Deprecated since Open Inventor 9620
SoGLCacheContextElement
is no longer supported. See section
Modifier and Type | Class and Description |
---|---|
static class |
SoGLCacheContextElement.AutoCacheModes
Deprecated.
Two bits are stored.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
DO_AUTO_CACHE
Deprecated.
Use
SoGLCacheContextElement.AutoCacheModes.DO_AUTO_CACHE instead. |
static int |
DONT_AUTO_CACHE
Deprecated.
|
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
static boolean |
areMipMapsFast(SoState state)
Deprecated.
true if mip-mapped textures are known to be fast.
|
static boolean |
extSupported(SoState state,
int ext)
Deprecated.
This routine is pretty quick.
|
static int |
get(SoState state)
Deprecated.
Gets the current context.
|
static int |
getClassStackIndex()
Deprecated.
As of Open Inventor 9.3 replaced by SoElement.getClassStackIndex(Class)
|
static int |
getExtID(java.lang.String str)
Deprecated.
Methods to quickly figure out if an OpenGL extension is available at run-time.
|
static boolean |
getIsRemoteRendering(SoState state)
Deprecated.
|
static boolean |
isCompileModeFaster(SoState state)
Deprecated.
true if we think GL_COMPILE is faster than GL_COMPILE_AND_EXECUTE.
|
static int |
resetAutoCacheBits(SoState state)
Deprecated.
Used by Separators to set/reset the auto-caching bits.
|
static void |
set(SoState state,
int context,
boolean is2PassTransparency,
boolean isRemoteRendering)
Deprecated.
Sets the current context.
|
static void |
setAutoCacheBits(SoState state,
int bits)
Deprecated.
Used by Separators to set/reset the auto-caching bits.
|
static void |
shouldAutoCache(SoState state,
int bits)
Deprecated.
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):
|
static void |
shouldAutoCache(SoState state,
SoGLCacheContextElement.AutoCacheModes mode)
Deprecated.
As of Open Inventor 9620 See documentation for more details
|
getClassStackIndex, pop, push
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int DO_AUTO_CACHE
SoGLCacheContextElement.AutoCacheModes.DO_AUTO_CACHE
instead.@Deprecated public static final int DONT_AUTO_CACHE
SoGLCacheContextElement.AutoCacheModes.DONT_AUTO_CACHE
instead.public static void setAutoCacheBits(SoState state, int bits)
public static void shouldAutoCache(SoState state, int bits)
public static boolean extSupported(SoState state, int ext)
public static boolean isCompileModeFaster(SoState state)
public static boolean areMipMapsFast(SoState state)
@Deprecated public static void shouldAutoCache(SoState state, SoGLCacheContextElement.AutoCacheModes mode)
SoGLRenderAction.shouldAutoCache(AutoCacheMode mode)
instead. public static int get(SoState state)
@Deprecated public static int getClassStackIndex()
public static void set(SoState state, int context, boolean is2PassTransparency, boolean isRemoteRendering)
SoSeparator
auto-caching algorithm uses this information to help decide whether or not to build caches.public static int resetAutoCacheBits(SoState state)
public static int getExtID(java.lang.String str)
public static boolean getIsRemoteRendering(SoState state)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com