Class Renderer3D
java.lang.Object
org.jzy3d.plot3d.rendering.canvas.Renderer3D
- All Implemented Interfaces:
panamagl.GLEventListener
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRenderer3D(View view) Initialize a Renderer attached to the given View.Renderer3D(View view, boolean traceGL, boolean debugGL) Initialize a Renderer attached to the given View, and activate GL trace and errors to console. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidLet the painter know the thread on which the GL context is current, so thatPanamaGLPainter.acquireGL()only returns GL on this thread.voiddisplay(panamagl.opengl.GL canvas) Called when theGLCanvasrequires a rendering.voiddispose(panamagl.opengl.GL gl) protected voidintReturn the height that was given after the last resize event.doubleintgetWidth()Return the width that was given after the last resize event.voidinit(panamagl.opengl.GL canvas) Called when theGLCanvasis rendered for the first time.voidvoidreshape(panamagl.opengl.GL canvas, int x, int y, int width, int height) Called when theGLCanvasis resized.protected voidupdatePainterWithGL(panamagl.opengl.GL canvas)
-
Field Details
-
view
-
width
protected int width -
height
protected int height -
doScreenshotAtNextDisplay
protected boolean doScreenshotAtNextDisplay -
traceGL
protected boolean traceGL -
debugGL
protected boolean debugGL -
profileDisplayTimer
-
lastRenderingTimeMs
protected double lastRenderingTimeMs
-
-
Constructor Details
-
Renderer3D
Initialize a Renderer attached to the given View. -
Renderer3D
public Renderer3D() -
Renderer3D
Initialize a Renderer attached to the given View, and activate GL trace and errors to console.
-
-
Method Details
-
init
public void init(panamagl.opengl.GL canvas) Called when theGLCanvasis rendered for the first time. When one calls Scene.init() function, this function is called and makes the OpenGL buffers initialization.- Specified by:
initin interfacepanamagl.GLEventListener
-
display
public void display(panamagl.opengl.GL canvas) Called when theGLCanvasrequires a rendering. All call to rendering methods should appear here.- Specified by:
displayin interfacepanamagl.GLEventListener
-
reshape
public void reshape(panamagl.opengl.GL canvas, int x, int y, int width, int height) Called when theGLCanvasis resized.- Specified by:
reshapein interfacepanamagl.GLEventListener
-
updatePainterWithGL
protected void updatePainterWithGL(panamagl.opengl.GL canvas) This method allows configuring theIPainterwith the currentGLcontext provided by theGLCanvas. This may be usefull to override in case of a mocking GL (to avoid having the mock replaced by a real GL Context).- Parameters:
canvas-
-
bindPainterToCurrentThread
protected void bindPainterToCurrentThread()Let the painter know the thread on which the GL context is current, so thatPanamaGLPainter.acquireGL()only returns GL on this thread. -
beginRendering
protected void beginRendering() -
endRendering
protected void endRendering() -
nextDisplayUpdateScreenshot
public void nextDisplayUpdateScreenshot() -
getWidth
public int getWidth()Return the width that was given after the last resize event. -
getHeight
public int getHeight()Return the height that was given after the last resize event. -
getLastRenderingTimeMs
public double getLastRenderingTimeMs() -
dispose
public void dispose(panamagl.opengl.GL gl) - Specified by:
disposein interfacepanamagl.GLEventListener
-