|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jzy3d.plot3d.rendering.view.Renderer3d
public class Renderer3d
The 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 constructor
| Field Summary | |
|---|---|
protected boolean |
debugGL
|
protected boolean |
doScreenshotAtNextDisplay
|
protected javax.media.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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
display(javax.media.opengl.GLAutoDrawable canvas)
Called when the GLAutoDrawable requires a rendering. |
void |
dispose(javax.media.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(javax.media.opengl.GLAutoDrawable canvas)
Called when the GLAutoDrawable is rendered for the first time. |
void |
nextDisplayUpdateScreenshot()
|
void |
reshape(javax.media.opengl.GLAutoDrawable canvas,
int x,
int y,
int width,
int height)
Called when the GLAutoDrawable is resized. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.media.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
| Constructor Detail |
|---|
public Renderer3d(View view)
public Renderer3d(View view,
boolean traceGL,
boolean debugGL)
| Method Detail |
|---|
public void init(javax.media.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 javax.media.opengl.GLEventListenerpublic void display(javax.media.opengl.GLAutoDrawable canvas)
GLAutoDrawable requires a rendering. All call to
rendering methods should appear here.
display in interface javax.media.opengl.GLEventListener
public void reshape(javax.media.opengl.GLAutoDrawable canvas,
int x,
int y,
int width,
int height)
GLAutoDrawable is resized.
reshape in interface javax.media.opengl.GLEventListenerpublic void dispose(javax.media.opengl.GLAutoDrawable arg0)
dispose in interface javax.media.opengl.GLEventListenerpublic void nextDisplayUpdateScreenshot()
public com.jogamp.opengl.util.texture.TextureData getLastScreenshot()
public int getWidth()
public int getHeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||