Class GLCanvasSwing

java.lang.Object
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, panamagl.canvas.GLCanvas

public class GLCanvasSwing extends JPanel implements panamagl.canvas.GLCanvas
This panel push to the screen an OpenGL image rendered offscreen by an OffscreenRenderer. The panel mainly deals with
  • OpenGL context initialization, after the panel is added to a parent, and before it is made visible.
  • repaint and resize events that are propagated to the OpenGL application through a GLEventListener, which must be provided by the user of this panel through setGLEventListener(GLEventListener).
  • measuring performance, that is evaluating the time required to trigger offscreen image rendering and image painting onscreen.

Threading

The panel is also responsible for triggering OpenGL initialization and rendering in the appropriate threads, which may depend on the running operating system.

Threading on macOS

Debugging

Hint : to debug this class, invoke a program using it with flag -Dpanamagl.canvas.GLCanvasSwing
Author:
Martin Pernollet
See Also: