com.sun.opengl.impl
Class GLDrawableHelper
java.lang.Object
com.sun.opengl.impl.GLDrawableHelper
public class GLDrawableHelper
- extends java.lang.Object
Encapsulates the implementation of most of the GLAutoDrawable's
methods to be able to share it between GLCanvas and GLJPanel.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GLDrawableHelper
public GLDrawableHelper()
addGLEventListener
public void addGLEventListener(GLEventListener listener)
removeGLEventListener
public void removeGLEventListener(GLEventListener listener)
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,
java.lang.Runnable runnable,
java.lang.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 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.