JOGL v2.6.0-rc-20250822
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.demos.es2.GearsES2 Class Reference

GearsES2.java
More...

Inheritance diagram for com.jogamp.opengl.demos.es2.GearsES2:
Collaboration diagram for com.jogamp.opengl.demos.es2.GearsES2:

Classes

class  GearsKeyAdapter
 
class  GearsMouseAdapter
 

Public Member Functions

 GearsES2 (final int swapInterval)
 
 GearsES2 ()
 
void setDoRotation (final boolean rotate)
 
void setClearBuffers (final boolean v)
 
void setClearStencilBuffer (final boolean v)
 
void setVerbose (final boolean v)
 
void setClearColor (final float[] clearColor)
 float[4] More...
 
void setGearsColor (final int idx, final float r, final float g, final float b, final float a)
 
void resetGearsColor ()
 
float getScale ()
 
void setScale (final float v)
 
float getRotX ()
 
float getRotY ()
 
void setRotX (final float v)
 
void setRotY (final float v)
 
void addPanning (final float x, final float y, final float z)
 
GearsObjectES2 getGear1 ()
 
GearsObjectES2 getGear2 ()
 
GearsObjectES2 getGear3 ()
 
void setUseMappedBuffers (final boolean v)
 
void setValidateBuffers (final boolean v)
 
PMVMatrix4f getPMVMatrix ()
 
boolean waitForInit (final boolean initialized) throws InterruptedException
 
void init (final GLAutoDrawable drawable)
 Called by the drawable immediately after the OpenGL context is initialized. More...
 
final boolean isInit ()
 
void setZ (final float zNear, final float zFar, final float zViewDist)
 
float getZNear ()
 
float getZFar ()
 
float getZViewDist ()
 
void reshape (final GLAutoDrawable glad, final int x, final int y, final int width, final int height)
 Called by the drawable during the first repaint after the component has been resized. More...
 
void reshapeForEye (final GLAutoDrawable drawable, final int x, final int y, final int width, final int height, final EyeParameter eyeParam, final ViewerPose viewerPose)
 Stereo capable specialization of reshape(GLAutoDrawable, int, int, int, int) for one StereoDeviceRenderer.Eye. More...
 
void dispose (final GLAutoDrawable drawable)
 Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs. More...
 
void display (final GLAutoDrawable drawable)
 Called by the drawable to initiate OpenGL rendering by the client. More...
 
void display (final GLAutoDrawable drawable, final int flags)
 Extended display method, allowing to pass a display flag, e.g. More...
 
String toString ()
 
KeyListener getKeyListener ()
 
MouseListener getMouseListener ()
 
void reshapeForEye (final GLAutoDrawable drawable, final int x, final int y, final int width, final int height, final EyeParameter eyeParam, final ViewerPose viewerPose)
 Stereo capable specialization of reshape(GLAutoDrawable, int, int, int, int) for one StereoDeviceRenderer.Eye. More...
 
void display (final GLAutoDrawable drawable, final int flags)
 Extended display method, allowing to pass a display flag, e.g. More...
 
void init (GLAutoDrawable drawable)
 Called by the drawable immediately after the OpenGL context is initialized. More...
 
void dispose (GLAutoDrawable drawable)
 Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs. More...
 
void display (GLAutoDrawable drawable)
 Called by the drawable to initiate OpenGL rendering by the client. More...
 
void reshape (GLAutoDrawable drawable, int x, int y, int width, int height)
 Called by the drawable during the first repaint after the component has been resized. More...
 

Static Public Member Functions

static void main (final String[] args)
 

Public Attributes

MouseListener gearsMouse = new GearsMouseAdapter()
 
KeyListener gearsKeys = new GearsKeyAdapter()
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.opengl.util.CustomGLEventListener
static final int DISPLAY_REPEAT = 1 << 0
 display flag: Repeat last produced image. More...
 
static final int DISPLAY_DONTCLEAR = 1 << 1
 display flag: Do not clear any target buffer, e.g. More...
 

Detailed Description

GearsES2.java

Author
Brian Paul (converted to Java by Ron Cemer and Sven Gothel)

Definition at line 67 of file GearsES2.java.

Constructor & Destructor Documentation

◆ GearsES2() [1/2]

com.jogamp.opengl.demos.es2.GearsES2.GearsES2 ( final int  swapInterval)

Definition at line 99 of file GearsES2.java.

◆ GearsES2() [2/2]

com.jogamp.opengl.demos.es2.GearsES2.GearsES2 ( )

Definition at line 103 of file GearsES2.java.

Here is the caller graph for this function:

Member Function Documentation

◆ addPanning()

void com.jogamp.opengl.demos.es2.GearsES2.addPanning ( final float  x,
final float  y,
final float  z 
)

Definition at line 144 of file GearsES2.java.

Here is the caller graph for this function:

◆ display() [1/2]

void com.jogamp.opengl.demos.es2.GearsES2.display ( final GLAutoDrawable  drawable)

Called by the drawable to initiate OpenGL rendering by the client.

After all GLEventListeners have been notified of a display event, the drawable will swap its buffers if setAutoSwapBufferMode is enabled.

Implements com.jogamp.opengl.GLEventListener.

Definition at line 422 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display() [2/2]

void com.jogamp.opengl.demos.es2.GearsES2.display ( final GLAutoDrawable  drawable,
final int  flags 
)

Extended display method, allowing to pass a display flag, e.g.

DISPLAY_REPEAT or DISPLAY_DONTCLEAR.

Method is usually called by a custom rendering loop, e.g. for manual stereo rendering or the like.

Parameters
drawable
flags

Implements com.jogamp.opengl.util.CustomGLEventListener.

Definition at line 427 of file GearsES2.java.

Here is the call graph for this function:

◆ dispose()

void com.jogamp.opengl.demos.es2.GearsES2.dispose ( final GLAutoDrawable  drawable)

Notifies the listener to perform the release of all OpenGL resources per GLContext, such as memory buffers and GLSL programs.

Called by the drawable before the OpenGL context is destroyed by an external event, like a reconfiguration of the GLAutoDrawable closing an attached window, but also manually by calling destroy.

Note that this event does not imply the end of life of the application. It could be produced with a followup call to init(GLAutoDrawable) in case the GLContext has been recreated, e.g. due to a pixel configuration change in a multihead environment.

Implements com.jogamp.opengl.GLEventListener.

Definition at line 385 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGear1()

GearsObjectES2 com.jogamp.opengl.demos.es2.GearsES2.getGear1 ( )
Returns
gear1

Definition at line 149 of file GearsES2.java.

◆ getGear2()

GearsObjectES2 com.jogamp.opengl.demos.es2.GearsES2.getGear2 ( )
Returns
gear2

Definition at line 154 of file GearsES2.java.

◆ getGear3()

GearsObjectES2 com.jogamp.opengl.demos.es2.GearsES2.getGear3 ( )
Returns
gear3

Definition at line 159 of file GearsES2.java.

◆ getKeyListener()

KeyListener com.jogamp.opengl.demos.es2.GearsES2.getKeyListener ( )

Definition at line 498 of file GearsES2.java.

◆ getMouseListener()

MouseListener com.jogamp.opengl.demos.es2.GearsES2.getMouseListener ( )

Definition at line 499 of file GearsES2.java.

◆ getPMVMatrix()

PMVMatrix4f com.jogamp.opengl.demos.es2.GearsES2.getPMVMatrix ( )

Definition at line 164 of file GearsES2.java.

◆ getRotX()

float com.jogamp.opengl.demos.es2.GearsES2.getRotX ( )

Definition at line 139 of file GearsES2.java.

◆ getRotY()

float com.jogamp.opengl.demos.es2.GearsES2.getRotY ( )

Definition at line 140 of file GearsES2.java.

◆ getScale()

float com.jogamp.opengl.demos.es2.GearsES2.getScale ( )

Definition at line 136 of file GearsES2.java.

◆ getZFar()

float com.jogamp.opengl.demos.es2.GearsES2.getZFar ( )

Definition at line 287 of file GearsES2.java.

◆ getZNear()

float com.jogamp.opengl.demos.es2.GearsES2.getZNear ( )

Definition at line 286 of file GearsES2.java.

◆ getZViewDist()

float com.jogamp.opengl.demos.es2.GearsES2.getZViewDist ( )

Definition at line 288 of file GearsES2.java.

◆ init()

void com.jogamp.opengl.demos.es2.GearsES2.init ( final GLAutoDrawable  drawable)

Called by the drawable immediately after the OpenGL context is initialized.

Can be used to perform one-time OpenGL initialization per GLContext, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying OpenGL context for the GLAutoDrawable is destroyed and recreated, for example if a GLCanvas is removed from the widget hierarchy and later added again.

Implements com.jogamp.opengl.GLEventListener.

Definition at line 186 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInit()

final boolean com.jogamp.opengl.demos.es2.GearsES2.isInit ( )

Definition at line 266 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

static void com.jogamp.opengl.demos.es2.GearsES2.main ( final String[]  args)
static

Definition at line 610 of file GearsES2.java.

Here is the call graph for this function:

◆ resetGearsColor()

void com.jogamp.opengl.demos.es2.GearsES2.resetGearsColor ( )

Definition at line 130 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reshape()

void com.jogamp.opengl.demos.es2.GearsES2.reshape ( final GLAutoDrawable  drawable,
final int  x,
final int  y,
final int  width,
final int  height 
)

Called by the drawable during the first repaint after the component has been resized.

The client can update it's viewport associated data and view volume of the window appropriately.

For efficiency the GL viewport has already been updated via glViewport(x, y, width, height) when this method is called.

Parameters
drawablethe triggering GLAutoDrawable
xlower left corner of the viewport rectangle in pixel units
ylower left corner of the viewport rectangle in pixel units
widthwidth of the viewport rectangle in pixel units
heightheight of the viewport rectangle in pixel units

Implements com.jogamp.opengl.GLEventListener.

Definition at line 291 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reshapeForEye()

void com.jogamp.opengl.demos.es2.GearsES2.reshapeForEye ( final GLAutoDrawable  drawable,
final int  x,
final int  y,
final int  width,
final int  height,
final EyeParameter  eyeParam,
final ViewerPose  viewerPose 
)

Stereo capable specialization of reshape(GLAutoDrawable, int, int, int, int) for one StereoDeviceRenderer.Eye.

Called by the stereo renderer before each display(GLAutoDrawable) or display(GLAutoDrawable, int) call.

The client can update it's viewport associated data and view volume of the window appropriately.

The client shall also update it's projection- and modelview matrices according to the given EyeParameter and ViewerPose.

For efficiency the GL viewport has already been updated via glViewport(x, y, width, height) when this method is called.

Parameters
drawablethe triggering GLAutoDrawable
xviewport x-coord in pixel units
yviewport y-coord in pixel units
widthviewport width in pixel units
heightviewport height in pixel units
eyeParamconstant eye parameter, i.e. FOV and IPD
viewerPosecurrent viewer position and orientation
See also
FloatUtil::makePerspective(float[], int, boolean, com.jogamp.math.FloatUtil.FovHVHalves, float, float)

Implements com.jogamp.opengl.util.stereo.StereoGLEventListener.

Definition at line 342 of file GearsES2.java.

Here is the call graph for this function:

◆ setClearBuffers()

void com.jogamp.opengl.demos.es2.GearsES2.setClearBuffers ( final boolean  v)

Definition at line 108 of file GearsES2.java.

Here is the caller graph for this function:

◆ setClearColor()

void com.jogamp.opengl.demos.es2.GearsES2.setClearColor ( final float[]  clearColor)

float[4]

Definition at line 113 of file GearsES2.java.

◆ setClearStencilBuffer()

void com.jogamp.opengl.demos.es2.GearsES2.setClearStencilBuffer ( final boolean  v)

Definition at line 109 of file GearsES2.java.

Here is the caller graph for this function:

◆ setDoRotation()

void com.jogamp.opengl.demos.es2.GearsES2.setDoRotation ( final boolean  rotate)

Definition at line 107 of file GearsES2.java.

◆ setGearsColor()

void com.jogamp.opengl.demos.es2.GearsES2.setGearsColor ( final int  idx,
final float  r,
final float  g,
final float  b,
final float  a 
)

Definition at line 117 of file GearsES2.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRotX()

void com.jogamp.opengl.demos.es2.GearsES2.setRotX ( final float  v)

Definition at line 141 of file GearsES2.java.

Here is the caller graph for this function:

◆ setRotY()

void com.jogamp.opengl.demos.es2.GearsES2.setRotY ( final float  v)

Definition at line 142 of file GearsES2.java.

Here is the caller graph for this function:

◆ setScale()

void com.jogamp.opengl.demos.es2.GearsES2.setScale ( final float  v)

Definition at line 137 of file GearsES2.java.

Here is the caller graph for this function:

◆ setUseMappedBuffers()

void com.jogamp.opengl.demos.es2.GearsES2.setUseMappedBuffers ( final boolean  v)

Definition at line 161 of file GearsES2.java.

◆ setValidateBuffers()

void com.jogamp.opengl.demos.es2.GearsES2.setValidateBuffers ( final boolean  v)

Definition at line 162 of file GearsES2.java.

◆ setVerbose()

void com.jogamp.opengl.demos.es2.GearsES2.setVerbose ( final boolean  v)

Definition at line 110 of file GearsES2.java.

Here is the caller graph for this function:

◆ setZ()

void com.jogamp.opengl.demos.es2.GearsES2.setZ ( final float  zNear,
final float  zFar,
final float  zViewDist 
)

Definition at line 281 of file GearsES2.java.

Here is the caller graph for this function:

◆ toString()

String com.jogamp.opengl.demos.es2.GearsES2.toString ( )

Definition at line 494 of file GearsES2.java.

◆ waitForInit()

boolean com.jogamp.opengl.demos.es2.GearsES2.waitForInit ( final boolean  initialized) throws InterruptedException
Returns
True if this GLEventListener became initialized within TIME_OUT 2s

Definition at line 175 of file GearsES2.java.

Member Data Documentation

◆ gearsKeys

KeyListener com.jogamp.opengl.demos.es2.GearsES2.gearsKeys = new GearsKeyAdapter()

Definition at line 87 of file GearsES2.java.

◆ gearsMouse

MouseListener com.jogamp.opengl.demos.es2.GearsES2.gearsMouse = new GearsMouseAdapter()

Definition at line 86 of file GearsES2.java.


The documentation for this class was generated from the following file: