com.jogamp.opengl.impl
Class GLDrawableHelper
java.lang.Object
com.jogamp.opengl.impl.GLDrawableHelper
public class GLDrawableHelper
- extends Object
Encapsulates the implementation of most of the GLAutoDrawable's
methods to be able to share it between GLCanvas and GLJPanel.
GLDrawableHelper
public GLDrawableHelper()
toString
public String toString()
- Overrides:
toString
in class Object
addGLEventListener
public void addGLEventListener(GLEventListener listener)
addGLEventListener
public void addGLEventListener(int index,
GLEventListener listener)
removeGLEventListener
public void removeGLEventListener(GLEventListener listener)
dispose
public void dispose(GLAutoDrawable drawable)
init
public void init(GLAutoDrawable drawable)
display
public void display(GLAutoDrawable drawable)
reshape
public void reshape(GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
setAutoSwapBufferMode
public void setAutoSwapBufferMode(boolean onOrOff)
getAutoSwapBufferMode
public boolean getAutoSwapBufferMode()
invokeGL
public void invokeGL(GLDrawable drawable,
GLContext context,
Runnable runnable,
Runnable initAction)
- Principal helper method which runs a Runnable with the context
made current. This could have been made part of GLContext, but a
desired goal is to be able to implement the GLCanvas in terms of
the GLContext's public APIs, and putting it into a separate
class helps ensure that we don't inadvertently use private
methods of the GLContext or its implementing classes.
Copyright 2010 JogAmp Community.