public class Renderer3d extends Object implements com.jogamp.opengl.GLEventListener
Renderer3d
object is a GLEventListener
, that makes openGL
calls necessary to initialize and render a Scene
for an
ICanvas
.
One can activate OpenGl errors in console by setting debugGL to true in the
constructor One can activate OpenGl feedback in console by setting traceGL to
true in the constructorModifier and Type | Field and Description |
---|---|
protected boolean |
debugGL |
protected boolean |
doScreenshotAtNextDisplay |
protected com.jogamp.opengl.glu.GLU |
glu |
protected int |
height |
protected com.jogamp.opengl.util.texture.TextureData |
image |
protected boolean |
traceGL |
protected View |
view |
protected int |
width |
Constructor and Description |
---|
Renderer3d() |
Renderer3d(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.
|
Renderer3d(View view,
boolean traceGL,
boolean debugGL,
com.jogamp.opengl.glu.GLU glu) |
Modifier and Type | Method and Description |
---|---|
void |
display(com.jogamp.opengl.GLAutoDrawable canvas)
Called when the
GLAutoDrawable requires a rendering. |
void |
dispose(com.jogamp.opengl.GLAutoDrawable arg0) |
int |
getHeight()
Return the height that was given after the last resize event.
|
com.jogamp.opengl.util.texture.TextureData |
getLastScreenshot() |
int |
getWidth()
Return the width that was given after the last resize event.
|
void |
init(com.jogamp.opengl.GLAutoDrawable canvas)
Called when the
GLAutoDrawable is rendered for the first time. |
void |
nextDisplayUpdateScreenshot() |
void |
reshape(com.jogamp.opengl.GLAutoDrawable canvas,
int x,
int y,
int width,
int height)
Called when the
GLAutoDrawable is resized. |
protected com.jogamp.opengl.glu.GLU glu
protected View view
protected int width
protected int height
protected boolean doScreenshotAtNextDisplay
protected com.jogamp.opengl.util.texture.TextureData image
protected boolean traceGL
protected boolean debugGL
public Renderer3d(View view)
public Renderer3d()
public Renderer3d(View view, boolean traceGL, boolean debugGL)
public Renderer3d(View view, boolean traceGL, boolean debugGL, com.jogamp.opengl.glu.GLU glu)
public void init(com.jogamp.opengl.GLAutoDrawable canvas)
GLAutoDrawable
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()) );
init
in interface com.jogamp.opengl.GLEventListener
public void display(com.jogamp.opengl.GLAutoDrawable canvas)
GLAutoDrawable
requires a rendering. All call to
rendering methods should appear here.display
in interface com.jogamp.opengl.GLEventListener
public void reshape(com.jogamp.opengl.GLAutoDrawable canvas, int x, int y, int width, int height)
GLAutoDrawable
is resized.reshape
in interface com.jogamp.opengl.GLEventListener
public void dispose(com.jogamp.opengl.GLAutoDrawable arg0)
dispose
in interface com.jogamp.opengl.GLEventListener
public void nextDisplayUpdateScreenshot()
public com.jogamp.opengl.util.texture.TextureData getLastScreenshot()
public int getWidth()
public int getHeight()
Copyright © 2016. All rights reserved.