|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.jogl.JOGLRenderer
public class JOGLRenderer
A basic renderer with basic support for animation.
| Field Summary | |
|---|---|
private double |
aspect
|
private double |
bottom
|
private ClockListener |
clockListener
|
static double |
DEFAULT_FAR
|
static double |
DEFAULT_FOVY
|
static double |
DEFAULT_NEAR
|
private double |
far
|
private double |
fovy
|
private static double |
FULLCIRCLE_DEGREES
|
private JOGLContext |
glc
|
private javax.media.opengl.GLAutoDrawable |
glDrawable
|
private int |
height
|
private boolean |
joglInitialized
|
private double |
left
|
private double |
mediaTime
|
private double |
near
|
private double |
right
|
private GLRenderObject |
scene
|
private double |
top
|
private boolean |
useVsync
|
private int |
width
|
| Constructor Summary | |
|---|---|
JOGLRenderer(javax.media.opengl.GLAutoDrawable glDrawable)
Create a new renderer, using an existing GLDrawable (i.e. a GLCanvas or GLJPanel) that should have its capabilities set, like wheter antialiasing should be used, how many stencilbits etcetera. |
|
JOGLRenderer(int numFSAA_Samples)
Create a new renderer, like JOGLRenderer(numFSAA_Samples, 0), i.e. with FSAA specified but no stencil buffer |
|
JOGLRenderer(int numFSAASamples,
int numStencilBits)
Create a new renderer, using a new GLCanvas with capabilities set to default values, except for the antialiasing setting. |
|
| Method Summary | |
|---|---|
void |
addKeyListener(KeyListener listener)
Adds a KeyListener to the internal GLCanvas or GLJPanel |
private void |
calculateFrustumFromFOVY()
|
void |
display(javax.media.opengl.GLAutoDrawable glDrawable)
Jogl callback for rendering the screen. |
void |
displayChanged(javax.media.opengl.GLAutoDrawable glDrawable,
boolean modeChanged,
boolean deviceChanged)
|
Component |
getAWTComponent()
return the internal GLCanvas or GLJPanel, in the form of an AWT Component, that could be added to an AWT or Swing Component. |
void |
init(javax.media.opengl.GLAutoDrawable glDrawable)
GLEventListener callback, called by a Jogl GLCanvas upon OpenGL context creation. |
void |
initTime(double t)
The time method required by the ClockListener interface; It sets the current media time, and then causes a Jogl display() call. |
void |
reshape(javax.media.opengl.GLAutoDrawable glDrawable,
int x,
int y,
int w,
int h)
Called when the glDrawable has been resized. |
void |
reshape(javax.media.opengl.GL gl,
int x,
int y,
int w,
int h)
|
void |
setClockListener(ClockListener listener)
Sets theClockListener |
void |
setFar(double far)
Sets the (positive) distance to the far clipping plane. |
void |
setFOVY(double fovy)
Sets the field of view in the Y direction, specified in degrees(!) |
void |
setNear(double near)
Sets the (positive) distance to the near clipping plane. |
void |
setScene(GLRenderObject scene)
Sets the 3D scene object, to be rendered. |
void |
setVsync(boolean useVsync)
Sets the vsync mode |
void |
time(double t)
The time method required by the ClockListener interface; It sets the current media time, and then causes a Jogl display() call. |
void |
useDebugGL()
Turn on the Jogl DebugGL mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.media.opengl.GLAutoDrawable glDrawable
private GLRenderObject scene
private JOGLContext glc
private ClockListener clockListener
private volatile double mediaTime
private volatile boolean joglInitialized
private boolean useVsync
public static final double DEFAULT_FOVY
public static final double DEFAULT_NEAR
public static final double DEFAULT_FAR
private double fovy
private double aspect
private int width
private int height
private double left
private double right
private double bottom
private double top
private double near
private double far
private static final double FULLCIRCLE_DEGREES
| Constructor Detail |
|---|
public JOGLRenderer(javax.media.opengl.GLAutoDrawable glDrawable)
public JOGLRenderer(int numFSAASamples,
int numStencilBits)
public JOGLRenderer(int numFSAA_Samples)
| Method Detail |
|---|
public void useDebugGL()
public void addKeyListener(KeyListener listener)
public Component getAWTComponent()
public void setScene(GLRenderObject scene)
public void setClockListener(ClockListener listener)
public void initTime(double t)
initTime in interface ClockListenerpublic void time(double t)
time in interface ClockListenerpublic void setVsync(boolean useVsync)
public void init(javax.media.opengl.GLAutoDrawable glDrawable)
init in interface javax.media.opengl.GLEventListenerpublic void display(javax.media.opengl.GLAutoDrawable glDrawable)
display in interface javax.media.opengl.GLEventListener
public void displayChanged(javax.media.opengl.GLAutoDrawable glDrawable,
boolean modeChanged,
boolean deviceChanged)
displayChanged in interface javax.media.opengl.GLEventListenerpublic void setFOVY(double fovy)
public void setNear(double near)
public void setFar(double far)
private void calculateFrustumFromFOVY()
public void reshape(javax.media.opengl.GLAutoDrawable glDrawable,
int x,
int y,
int w,
int h)
reshape in interface javax.media.opengl.GLEventListener
public void reshape(javax.media.opengl.GL gl,
int x,
int y,
int w,
int h)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||