Class Renderer3D
java.lang.Object
org.jzy3d.plot3d.rendering.canvas.Renderer3D
- All Implemented Interfaces:
GLEventListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected int
protected double
protected org.jzy3d.maths.TicToc
protected boolean
protected org.jzy3d.plot3d.rendering.view.View
protected int
-
Constructor Summary
ConstructorDescriptionRenderer3D
(org.jzy3d.plot3d.rendering.view.View view) Initialize a Renderer attached to the given View.Renderer3D
(org.jzy3d.plot3d.rendering.view.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 TypeMethodDescriptionvoid
Called when theGLCanvas
requires a rendering.void
int
Return the height that was given after the last resize event.double
int
getWidth()
Return the width that was given after the last resize event.void
Called when theGLCanvas
is rendered for the first time.void
SCREENSHOTSvoid
Called when theGLCanvas
is resized.protected void
updatePainterWithGL
(GL canvas)
-
Field Details
-
view
protected org.jzy3d.plot3d.rendering.view.View view -
width
protected int width -
height
protected int height -
doScreenshotAtNextDisplay
protected boolean doScreenshotAtNextDisplay -
traceGL
protected boolean traceGL -
debugGL
protected boolean debugGL -
profileDisplayTimer
protected org.jzy3d.maths.TicToc profileDisplayTimer -
lastRenderingTimeMs
protected double lastRenderingTimeMs
-
-
Constructor Details
-
Renderer3D
public Renderer3D(org.jzy3d.plot3d.rendering.view.View view) Initialize a Renderer attached to the given View. -
Renderer3D
public Renderer3D() -
Renderer3D
public Renderer3D(org.jzy3d.plot3d.rendering.view.View view, boolean traceGL, boolean debugGL) Initialize a Renderer attached to the given View, and activate GL trace and errors to console.
-
-
Method Details
-
init
Called when theGLCanvas
is rendered for the first time. When one calls Scene.init() function, this function is called and makes the OpenGL buffers initialization. Note: in this implementation, GL Exceptions are not triggered. To do so, make te following call at the beginning of the init() body:canvas.setGL( new DebugGL(canvas.getGL()) );
- Specified by:
init
in interfaceGLEventListener
-
display
Called when theGLCanvas
requires a rendering. All call to rendering methods should appear here.- Specified by:
display
in interfaceGLEventListener
-
reshape
Called when theGLCanvas
is resized.- Specified by:
reshape
in interfaceGLEventListener
-
updatePainterWithGL
This method allows configuring theIPainter
with the currentGL
context 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
-
-
nextDisplayUpdateScreenshot
public void nextDisplayUpdateScreenshot()SCREENSHOTS -
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
- Specified by:
dispose
in interfaceGLEventListener
-