Class GLCanvasSWT

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
panamagl.canvas.swt.GLCanvasSWT
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, panamagl.canvas.GLCanvas

public class GLCanvasSWT extends org.eclipse.swt.widgets.Canvas implements panamagl.canvas.GLCanvas
An SWT Canvas that renders OpenGL offscreen via FBO and paints the result as an image. Unlike GLCanvasSWT_direct which uses SWT's native GLCanvas with a real GL context, this canvas uses the OffscreenRenderer pipeline (FBO rendering + pixel readback) consistent with the Swing and JavaFX offscreen canvases. The rendering pipeline is:
  1. display() triggers OffscreenRenderer.onDisplay(panamagl.canvas.GLCanvas, panamagl.GLEventListener)
  2. ThreadRedirect_SWT routes to the appropriate thread
  3. FBO render + FBOReader_SWT.read(panamagl.offscreen.FBO, panamagl.opengl.GL) produces a SWTImage
  4. setScreenshot(panamagl.Image<?>) stores the image and calls Control.redraw()
  5. SWT Paint event draws the ImageData to screen via GC