com.jogamp.opengl.impl
Class GLContextShareSet
java.lang.Object
com.jogamp.opengl.impl.GLContextShareSet
public class GLContextShareSet
- extends Object
Provides a mechanism by which OpenGL contexts can share textures
and display lists in the face of multithreading and asynchronous
context creation as is inherent in the AWT and Swing.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GLContextShareSet
public GLContextShareSet()
registerSharing
public static void registerSharing(GLContext share1,
GLContext share2)
- Indicate that contexts
share1
and
share2
will share textures and display lists. Both
must be non-null.
getShareContext
public static GLContext getShareContext(GLContext contextToCreate)
contextCreated
public static void contextCreated(GLContext context)
contextDestroyed
public static void contextDestroyed(GLContext context)
registerForBufferObjectSharing
public static void registerForBufferObjectSharing(GLContext olderContextOrNull,
GLContext newContext)
- In order to avoid glGet calls for buffer object checks related
to glVertexPointer, etc. calls as well as glMapBuffer calls, we
need to share the same GLBufferSizeTracker object between
contexts sharing textures and display lists. For now we keep
this mechanism orthogonal to the GLObjectTracker to hopefully
keep things easier to understand. (The GLObjectTracker is
currently only needed in a fairly esoteric case, when the
Java2D/JOGL bridge is active, but the GLBufferSizeTracker
mechanism is now always required.)
Copyright 2010 JogAmp Community.