|
|||||||||
| Home >> All >> gl4java >> [ drawable overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
gl4java.drawable
Interface GLDrawable

- public interface GLDrawable
Abstracts common functionality among the OpenGL components such as GLCanvas and GLJPanel. The GLDrawable/GLEventListener interfaces allow client code to draw using OpenGL without subclassing.
| Method Detail |
addGLEventListener
public void addGLEventListener(GLEventListener listener)
- Add a GLEventListener to this drawable. If multiple listeners
are added to a given drawable, they are notified of events in an
arbitrary order.
removeGLEventListener
public void removeGLEventListener(GLEventListener listener)
- Remove a GLEventListener from this drawable.
getGL
public gl4java.GLFunc getGL()
- Gets the GL functions used by this drawable. When running on
JDK 1.4 this will return a gl4java.GLFunc14.
getGLU
public gl4java.GLUFunc getGLU()
- Gets the GLU functions used by this drawable. When running on
JDK 1.4 this will return a gl4java.GLUFunc14.
getGLContext
public gl4java.GLContext getGLContext()
- Used to return the created GLContext
display
public void display()
- This is the rendering-method called by
e.g.: GLCanvas.display()>
GLCanvas.display()55 or by GLRunnable.run()>GLRunnable.run()55 .The default implementation of display() sends preDisplay, display and postDisplay events to all GLEventListeners associated with this GLDrawable in the above order.
reset timer for frame duration for_all(gl4java.drawable.GLEventListener) SEND preDisplay if( gljMakeCurrent() ) { for_all(gl4java.drawable.GLEventListener) SEND display gljSwap() gljFree() for_all(gl4java.drawable.GLEventListener) SEND postDisplay } stop timer for frame durationIf you use the subclassing model (as opposed to the GLEventListener model), your subclass will redefine this to perform its OpenGL drawing. In this case you MUST encapsulate your OpenGL calls within:
- glj.gljMakeCurrent() YOUR OpenGL commands here ! - glj.gljFree()
repaint
public void repaint()
- this function can be called to force a repaint
Repaints this component.
This method causes a call to this component's update method
as soon as possible.
addComponentListener
public void addComponentListener(java.awt.event.ComponentListener l)
- the components listener's should be implemented also !
since JDK 1.1
removeComponentListener
public void removeComponentListener(java.awt.event.ComponentListener l)
addFocusListener
public void addFocusListener(java.awt.event.FocusListener l)
addKeyListener
public void addKeyListener(java.awt.event.KeyListener l)
removeFocusListener
public void removeFocusListener(java.awt.event.FocusListener l)
addMouseListener
public void addMouseListener(java.awt.event.MouseListener l)
removeMouseListener
public void removeMouseListener(java.awt.event.MouseListener l)
addMouseMotionListener
public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
removeMouseMotionListener
public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
|
|||||||||
| Home >> All >> gl4java >> [ drawable overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC