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

GearsES2.java
More...

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

Classes

class  GearsKeyAdapter
 
class  GearsMouseAdapter
 

Public Member Functions

 GearsES2 (final int swapInterval)
 
 GearsES2 ()
 
void addTileRendererNotify (final TileRendererBase tr)
 The owning GLAutoDrawable is attached to the given TileRendererBase instance. More...
 
void removeTileRendererNotify (final TileRendererBase tr)
 The owning GLAutoDrawable is detached from the given TileRendererBase instance. More...
 
void startTileRendering (final TileRendererBase tr)
 Called by the TileRendererBase during tile-rendering after TileRendererBase#beginTile(GL) and before reshapeTile(..). More...
 
void endTileRendering (final TileRendererBase tr)
 Called by the TileRenderer during tile-rendering after TileRendererBase#endTile(GL) and GLAutoDrawable#swapBuffers(). More...
 
void setIgnoreFocus (final boolean v)
 
void setDoRotation (final boolean rotate)
 
void setClearBuffers (final boolean v)
 
GearsES2 setVerbose (final boolean v)
 
void setFlipVerticalInGLOrientation (final boolean v)
 
void setClearColor (final float[] clearColor)
 float[4] More...
 
void setGearsColors (final FloatBuffer gear1Color, final FloatBuffer gear2Color, final FloatBuffer gear3Color)
 
void setSharedGears (final GearsES2 shared)
 
void setSyncObjects (final Object sync)
 
GearsObjectES2 getGear1 ()
 
GearsObjectES2 getGear2 ()
 
GearsObjectES2 getGear3 ()
 
boolean usesSharedGears ()
 
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 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 reshapeTile (final TileRendererBase tr, final int tileX, final int tileY, final int tileWidth, final int tileHeight, final int imageWidth, final int imageHeight)
 Called by the TileRendererBase during tile-rendering via an attached GLAutoDrawable's GLAutoDrawable#display() call for each tile before display(GLAutoDrawable). More...
 
void setZ (final float zNear, final float zFar, final float zViewDist)
 
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...
 
void setGLStates (final GL2ES2 gl, final boolean enable)
 
String toString ()
 
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...
 
void addTileRendererNotify (TileRendererBase tr)
 The owning GLAutoDrawable is attached to the given TileRendererBase instance. More...
 
void removeTileRendererNotify (TileRendererBase tr)
 The owning GLAutoDrawable is detached from the given TileRendererBase instance. More...
 
void reshapeTile (TileRendererBase tr, int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight)
 Called by the TileRendererBase during tile-rendering via an attached GLAutoDrawable's GLAutoDrawable#display() call for each tile before display(GLAutoDrawable). More...
 
void startTileRendering (TileRendererBase tr)
 Called by the TileRendererBase during tile-rendering after TileRendererBase#beginTile(GL) and before reshapeTile(..). More...
 
void endTileRendering (TileRendererBase tr)
 Called by the TileRenderer during tile-rendering after TileRendererBase#endTile(GL) and GLAutoDrawable#swapBuffers(). More...
 

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 65 of file GearsES2.java.

Constructor & Destructor Documentation

◆ GearsES2() [1/2]

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

Definition at line 103 of file GearsES2.java.

◆ GearsES2() [2/2]

com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.GearsES2 ( )

Definition at line 107 of file GearsES2.java.

Member Function Documentation

◆ addTileRendererNotify()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.addTileRendererNotify ( final TileRendererBase  tr)

The owning GLAutoDrawable is attached to the given TileRendererBase instance.

The GLContext of the TileRendererBase's attached GLAutoDrawable is not current.

Parameters
trthe associated TileRendererBase
See also
TileRendererBase::getAttachedDrawable()

Implements com.jogamp.opengl.util.TileRendererBase.TileRendererListener.

Definition at line 112 of file GearsES2.java.

Here is the call graph for this function:

◆ display() [1/2]

void com.jogamp.opengl.test.junit.jogl.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 507 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.test.junit.jogl.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 512 of file GearsES2.java.

Here is the call graph for this function:

◆ dispose()

void com.jogamp.opengl.test.junit.jogl.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 468 of file GearsES2.java.

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

◆ endTileRendering()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.endTileRendering ( final TileRendererBase  tr)

Called by the TileRenderer during tile-rendering after TileRendererBase#endTile(GL) and GLAutoDrawable#swapBuffers().

If TileRendererBase is of type TileRenderer, method is called for the last tile of all tiles.
Otherwise, i.e. RandomTileRenderer, method is called for each particular tile.

The GLContext of the TileRenderer's attached GLAutoDrawable is current.

Parameters
trthe issuing TileRendererBase

Implements com.jogamp.opengl.util.TileRendererBase.TileRendererListener.

Definition at line 127 of file GearsES2.java.

◆ getGear1()

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

Definition at line 159 of file GearsES2.java.

Here is the caller graph for this function:

◆ getGear2()

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

Definition at line 164 of file GearsES2.java.

Here is the caller graph for this function:

◆ getGear3()

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

Definition at line 169 of file GearsES2.java.

Here is the caller graph for this function:

◆ getPMVMatrix()

PMVMatrix4f com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.getPMVMatrix ( )

Definition at line 176 of file GearsES2.java.

◆ init()

void com.jogamp.opengl.test.junit.jogl.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 198 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.test.junit.jogl.demos.es2.GearsES2.isInit ( )

Definition at line 314 of file GearsES2.java.

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

◆ removeTileRendererNotify()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.removeTileRendererNotify ( final TileRendererBase  tr)

The owning GLAutoDrawable is detached from the given TileRendererBase instance.

The GLContext of the TileRendererBase's attached GLAutoDrawable is not current.

Parameters
trthe disassociated TileRendererBase
See also
TileRendererBase::getAttachedDrawable()

Implements com.jogamp.opengl.util.TileRendererBase.TileRendererListener.

Definition at line 118 of file GearsES2.java.

Here is the call graph for this function:

◆ reshape()

void com.jogamp.opengl.test.junit.jogl.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 326 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.test.junit.jogl.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 418 of file GearsES2.java.

Here is the call graph for this function:

◆ reshapeTile()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.reshapeTile ( final TileRendererBase  tr,
final int  tileX,
final int  tileY,
final int  tileWidth,
final int  tileHeight,
final int  imageWidth,
final int  imageHeight 
)

Called by the TileRendererBase during tile-rendering via an attached GLAutoDrawable's GLAutoDrawable#display() call for each tile before display(GLAutoDrawable).

The PMV Matrix shall be reshaped according to the given

  • current tile-position
  • current tile-size
  • final image-size

The GL viewport is already set to origin 0/0 and the current tile-size.
See details in TileRendererBase#beginTile(GL).

The GLContext of the TileRendererBase's attached GLAutoDrawable is current.

Parameters
trthe issuing TileRendererBase
tileXthe current tile's x-pos
tileYthe current tile's y-pos
tileWidththe current tile's width
tileHeightthe current tile's height
imageWidththe final image width
imageHeightthe final image height
See also
TileRendererBase::getAttachedDrawable()

Implements com.jogamp.opengl.util.TileRendererBase.TileRendererListener.

Definition at line 334 of file GearsES2.java.

Here is the call graph for this function:

◆ setClearBuffers()

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

Definition at line 133 of file GearsES2.java.

◆ setClearColor()

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

float[4]

Definition at line 138 of file GearsES2.java.

◆ setDoRotation()

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

Definition at line 132 of file GearsES2.java.

Here is the caller graph for this function:

◆ setFlipVerticalInGLOrientation()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setFlipVerticalInGLOrientation ( final boolean  v)

Definition at line 135 of file GearsES2.java.

Here is the caller graph for this function:

◆ setGearsColors()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setGearsColors ( final FloatBuffer  gear1Color,
final FloatBuffer  gear2Color,
final FloatBuffer  gear3Color 
)

Definition at line 142 of file GearsES2.java.

◆ setGLStates()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setGLStates ( final GL2ES2  gl,
final boolean  enable 
)

Definition at line 584 of file GearsES2.java.

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

◆ setIgnoreFocus()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setIgnoreFocus ( final boolean  v)

Definition at line 131 of file GearsES2.java.

Here is the caller graph for this function:

◆ setSharedGears()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setSharedGears ( final GearsES2  shared)

Definition at line 148 of file GearsES2.java.

Here is the caller graph for this function:

◆ setSyncObjects()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setSyncObjects ( final Object  sync)

Definition at line 152 of file GearsES2.java.

Here is the caller graph for this function:

◆ setUseMappedBuffers()

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

Definition at line 173 of file GearsES2.java.

Here is the caller graph for this function:

◆ setValidateBuffers()

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

Definition at line 174 of file GearsES2.java.

Here is the caller graph for this function:

◆ setVerbose()

GearsES2 com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.setVerbose ( final boolean  v)

Definition at line 134 of file GearsES2.java.

Here is the caller graph for this function:

◆ setZ()

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

Definition at line 347 of file GearsES2.java.

◆ startTileRendering()

void com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.startTileRendering ( final TileRendererBase  tr)

Called by the TileRendererBase during tile-rendering after TileRendererBase#beginTile(GL) and before reshapeTile(..).

If TileRendererBase is of type TileRenderer, method is called for the first tile of all tiles.
Otherwise, i.e. RandomTileRenderer, method is called for each particular tile.

The GLContext of the TileRenderer's attached GLAutoDrawable is current.

Parameters
trthe issuing TileRendererBase

Implements com.jogamp.opengl.util.TileRendererBase.TileRendererListener.

Definition at line 123 of file GearsES2.java.

◆ toString()

String com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.toString ( )

Definition at line 601 of file GearsES2.java.

◆ usesSharedGears()

boolean com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2.usesSharedGears ( )

Definition at line 171 of file GearsES2.java.

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

◆ waitForInit()

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

Definition at line 187 of file GearsES2.java.

Here is the caller graph for this function:

Member Data Documentation

◆ gearsKeys

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

Definition at line 89 of file GearsES2.java.

◆ gearsMouse

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

Definition at line 88 of file GearsES2.java.


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