Class JoglSwingCanvas

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jogamp.opengl.awt.GLJPanel
com.ardor3d.framework.jogl.awt.JoglSwingCanvas
All Implemented Interfaces:
Canvas, com.jogamp.nativewindow.awt.AWTPrintLifecycle, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.nativewindow.ScalableSurface, com.jogamp.nativewindow.WindowClosingProtocol, com.jogamp.opengl.awt.AWTGLAutoDrawable, com.jogamp.opengl.awt.ComponentEvents, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLSharedContextSetter, ImageObserver, MenuContainer, Serializable, Accessible

public class JoglSwingCanvas extends com.jogamp.opengl.awt.GLJPanel implements Canvas
Ardor3D JOGL Swing lightweight canvas, Swing component for the OpenGL rendering of Ardor3D with JOGL that supports the AWT input system directly and its abstraction in Ardor3D (com.ardor3d.input.awt). As this canvas is generally slower and heavier (in term of memory footprint) than JoglAwtCanvas, use it if and only if you have some problems when mixing heavyweight and lightweight components.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init()
      Description copied from interface: Canvas
      Do work to initialize this canvas, generally setting up the associated CanvasRenderer, etc.
      Specified by:
      init in interface Canvas
    • draw

      public void draw(CountDownLatch latch)
      Description copied from interface: Canvas
      Ask the canvas to render itself. Note that this may occur in another thread and therefore a latch is given so the caller may know when the draw has completed.
      Specified by:
      draw in interface Canvas
      Parameters:
      latch - a counter that should be decremented once drawing has completed.
    • getCanvasRenderer

      public JoglCanvasRenderer getCanvasRenderer()
      Specified by:
      getCanvasRenderer in interface Canvas
      Returns:
      the CanvasRenderer associated with this Canvas.
    • getMouseManager

      public MouseManager getMouseManager()
      Specified by:
      getMouseManager in interface Canvas
      Returns:
      the MouseManager associated with this Canvas, if any
    • setMouseManager

      public void setMouseManager(MouseManager manager)
      Description copied from interface: Canvas
      Sets a MouseManager to be associated with this Canvas.
      Specified by:
      setMouseManager in interface Canvas
      Parameters:
      manager - the manager to associate
    • setVSyncEnabled

      public void setVSyncEnabled(boolean enabled)