Class Scene
- java.lang.Object
-
- com.jogamp.graph.ui.Scene
-
- All Implemented Interfaces:
Container,GLEventListener,EventListener
public final class Scene extends Object implements Container, GLEventListener
GraphUI SceneGraphUI is GPU based and resolution independent.
GraphUI is intended to become an immediate- and retained-mode API.
To utilize a Scene instance directly as a
GLEventListener, user needs tosetClearParams(float[], int). Otherwise user may just call providedGLEventListenerfrom within their own workflow -GLEventListener.init(GLAutoDrawable)-GLEventListener.reshape(GLAutoDrawable, int, int, int, int)-GLEventListener.display(GLAutoDrawable)-GLEventListener.dispose(GLAutoDrawable)setPMVMatrixSetup(PMVMatrixSetup)maybe used to provide a customPMVMatrixsetup.- See Also:
Shape
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceScene.PMVMatrixSetupInterface providinga methodto setupPMVMatrix'sGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEW.
-
Field Summary
Fields Modifier and Type Field Description static floatDEFAULT_ANGLEDefault projection angle in degrees value is 45.0.static floatDEFAULT_SCENE_DISTDefault scene distance on z-axis to projection is -1/5f.static floatDEFAULT_ZFARDefault projection z-far value is 7000.static floatDEFAULT_ZNEARDefault projection z-near value is 0.1.
-
Constructor Summary
Constructors Constructor Description Scene()Create a new scene with an internally created RegionRenderer and using default valuesDEFAULT_SCENE_DIST,DEFAULT_ANGLE,DEFAULT_ZNEARandDEFAULT_ZFAR.Scene(RegionRenderer renderer)Create a new scene taking ownership of the given RegionRenderer and using default valuesDEFAULT_SCENE_DIST,DEFAULT_ANGLE,DEFAULT_ZNEARandDEFAULT_ZFAR.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShape(Shape s)voidaddShapes(Collection<? extends Shape> shapes)voidattachInputListenerTo(GLWindow window)booleancontains(Shape s)voiddetachInputListenerFrom(GLWindow window)voiddisplay(GLAutoDrawable drawable)Called by the drawable to initiate OpenGL rendering by the client.voiddispose(GLAutoDrawable drawable)booleanforAll(Shape.Visitor1 v)Traverses through the graph and applyShape.Visitor1.visit(Shape)for each, stop if it returns true.booleanforAll(PMVMatrix pmv, Shape.Visitor2 v)Traverses through the graph and applyShape.Visitor2.visit(Shape, PMVMatrix)for each, stop if it returns true.booleanforOne(PMVMatrix pmv, Shape shape, Runnable action)Traverses through the graph up untilshapeand applyactionon it.booleanforSortedAll(Comparator<Shape> sortComp, PMVMatrix pmv, Shape.Visitor2 v)Traverses through the graph and applyVisitor#visit(Shape, PMVMatrix)for each, stop if it returns true.ShapegetActiveShape()AABBoxgetBounds()Describing the scene's object model-dimensions of the plane at scene-distance covering the visible viewport rectangle.AABBoxgetBounds(PMVMatrix pmv, Shape shape)float[]getClearColor()Returns theglClearColor(..)arguments, seesetClearParams(float[], int).intgetClearMask()Returns theglClear(..)mask, seesetClearParams(float[], int).static Scene.PMVMatrixSetupgetDefaultPMVMatrixSetup()Return the defaultScene.PMVMatrixSetup.intgetHeight()Returns thegetViewport()'s height, set after initialreshape(GLAutoDrawable, int, int, int, int).PMVMatrixgetMatrix()Borrow the currentPMVMatrix.Scene.PMVMatrixSetupgetPMVMatrixSetup()Return the default orsetPMVMatrixSetup(PMVMatrixSetup)Scene.PMVMatrixSetup.RegionRenderergetRenderer()Returns the associated RegionRendererintgetSampleCount()intgetScreenshotCount()Return the number ofnextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String)calls.ShapegetShapeByIdx(int id)ShapegetShapeByName(int name)List<Shape>getShapes()static StringgetStatusText(FPSCounter fpsCounter)Return a formatted status string containing avg fps and avg frame duration.StringgetStatusText(GLAutoDrawable glad, int renderModes, int quality, float dpi)Return a formatted status string containing avg fps and avg frame duration.RectigetViewport()Borrows the current int[4] viewport w/o copying.RectigetViewport(Recti target)Copies the current int[4] viewport in given target and returns it for chaining.intgetWidth()Returns thegetViewport()'s width, set after initialreshape(GLAutoDrawable, int, int, int, int).voidinit(GLAutoDrawable drawable)Called by the drawable immediately after the OpenGL context is initialized.booleanisFrustumCullingEnabled()Return whetherfrustum cullingis enabled.voidmarkAllShapesDirty()FilenextScreenshotFile(String dir, String prefix, int renderModes, GLCapabilitiesImmutable caps, String contentDetail)Return the unique next technical screenshot PNGFileinstance as follows:ShapepickShape(PMVMatrix pmv, int glWinX, int glWinY, Vec3f objPos, Shape[] shape, Runnable runnable)voidpickShapeGL(int glWinX, int glWinY, Vec3f objPos, Shape[] shape, Runnable runnable)Attempt to pick aShapeusing the OpenGL false color rendering.voidreleaseActiveShape()voidremoveAllShapes()Removes all contained shapes, w/odestroyingthem.voidremoveAllShapes(GL2ES2 gl)Removes all given shapes and destroys them.ShaperemoveShape(int idx)Removes shape at given index, w/odestroyingthem.ShaperemoveShape(Shape s)Removes given shape, w/odestroyingthem.voidremoveShape(GL2ES2 gl, Shape s)Removes given shape and destroy it.voidremoveShapes(GL2ES2 gl, Collection<? extends Shape> shapes)Removes all given shapes and destroys them.voidremoveShapes(Collection<? extends Shape> shapes)Removes all given shapes, w/odestroyingthem.voidreshape(GLAutoDrawable drawable, int x, int y, int width, int height)Reshape scene using#setupMatrix(PMVMatrix, int, int, int, int)usingScene.PMVMatrixSetup.voidscreenshot(boolean wait, File file)Write current read drawable (screen) to a file onon the display call.voidscreenshot(GL gl, File file)Write current read drawable (screen) to a file.voidsetAllShapesQuality(int q)voidsetAllShapesSharpness(float sharpness)voidsetClearParams(float[] clearColor, int clearMask)Sets the clear parameter forglClearColor(..)andglClear(..)to be issued atdisplay(GLAutoDrawable).voidsetDebugBorderBox(float v)Sets the debugborderthickness for all existing or added shapes, zero for no debug border (default).voidsetFrustumCullingEnabled(boolean v)Enable or disablePMVMatrix.getFrustum()culling perShape.voidsetPMVMatrixSetup(Scene.PMVMatrixSetup setup)Set a customScene.PMVMatrixSetup.intsetSampleCount(int v)voidsetupMatrix(PMVMatrix pmv)SetupPMVMatrixGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWusing implicitgetViewport()surface dimension by callinggetPMVMatrixSetup()'sScene.PMVMatrixSetup.set(PMVMatrix, Recti).voidsetupMatrix(PMVMatrix pmv, Recti viewport)voidsurfaceToPlaneSize(Recti viewport, float zNear, float zFar, float objOrthoDist, Vec2f objSceneSize)Map given window surface-size to object coordinates relative to this scene using the give projection parameters.voidsurfaceToPlaneSize(Recti viewport, Vec2f objSceneSize)Map given window surface-size to object coordinates relative to this scene using the defaultScene.PMVMatrixSetup, i.e.voidwaitUntilDisplayed()Blocks until firstdisplay(GLAutoDrawable)has completed after construction or {@link #dispose(GLAutoDrawable).static voidwinToPlaneCoord(PMVMatrix pmv, Recti viewport, float zNear, float zFar, float winX, float winY, float objOrthoZ, Vec3f objPos)voidwinToShapeCoord(Shape shape, int glWinX, int glWinY, PMVMatrix pmv, Vec3f objPos, Runnable runnable)CallingShape#winToObjCoord(Scene, int, int, float[]), retrieving its Shape object position.
-
-
-
Field Detail
-
DEFAULT_SCENE_DIST
public static final float DEFAULT_SCENE_DIST
Default scene distance on z-axis to projection is -1/5f.- See Also:
- Constant Field Values
-
DEFAULT_ANGLE
public static final float DEFAULT_ANGLE
Default projection angle in degrees value is 45.0.- See Also:
- Constant Field Values
-
DEFAULT_ZNEAR
public static final float DEFAULT_ZNEAR
Default projection z-near value is 0.1.- See Also:
- Constant Field Values
-
DEFAULT_ZFAR
public static final float DEFAULT_ZFAR
Default projection z-far value is 7000.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Scene
public Scene()
Create a new scene with an internally created RegionRenderer and using default valuesDEFAULT_SCENE_DIST,DEFAULT_ANGLE,DEFAULT_ZNEARandDEFAULT_ZFAR.
-
Scene
public Scene(RegionRenderer renderer)
Create a new scene taking ownership of the given RegionRenderer and using default valuesDEFAULT_SCENE_DIST,DEFAULT_ANGLE,DEFAULT_ZNEARandDEFAULT_ZFAR.
-
-
Method Detail
-
getRenderer
public RegionRenderer getRenderer()
Returns the associated RegionRenderer
-
setClearParams
public final void setClearParams(float[] clearColor, int clearMask)Sets the clear parameter forglClearColor(..)andglClear(..)to be issued atdisplay(GLAutoDrawable). Without setting these parameter, user has to issueglClearColor(..)andglClear(..)before callingdisplay(GLAutoDrawable).- Parameters:
clearColor-glClearColor(..)argumentsclearMask-glClear(..)mask, default isGL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT
-
getClearColor
public final float[] getClearColor()
Returns theglClearColor(..)arguments, seesetClearParams(float[], int).
-
getClearMask
public final int getClearMask()
Returns theglClear(..)mask, seesetClearParams(float[], int).
-
setFrustumCullingEnabled
public final void setFrustumCullingEnabled(boolean v)
Description copied from interface:ContainerEnable or disablePMVMatrix.getFrustum()culling perShape. Default is disabled.- Specified by:
setFrustumCullingEnabledin interfaceContainer
-
isFrustumCullingEnabled
public final boolean isFrustumCullingEnabled()
Description copied from interface:ContainerReturn whetherfrustum cullingis enabled.- Specified by:
isFrustumCullingEnabledin interfaceContainer
-
attachInputListenerTo
public void attachInputListenerTo(GLWindow window)
-
detachInputListenerFrom
public void detachInputListenerFrom(GLWindow window)
-
removeShape
public Shape removeShape(Shape s)
Description copied from interface:ContainerRemoves given shape, w/odestroyingthem.- Specified by:
removeShapein interfaceContainer- Returns:
- the removed shape or null if not contained
-
removeShape
public Shape removeShape(int idx)
Description copied from interface:ContainerRemoves shape at given index, w/odestroyingthem.- Specified by:
removeShapein interfaceContainer- Returns:
- the removed shape
-
addShapes
public void addShapes(Collection<? extends Shape> shapes)
-
removeShapes
public void removeShapes(Collection<? extends Shape> shapes)
Description copied from interface:ContainerRemoves all given shapes, w/odestroyingthem.- Specified by:
removeShapesin interfaceContainer
-
removeShapes
public void removeShapes(GL2ES2 gl, Collection<? extends Shape> shapes)
Removes all given shapes and destroys them.
-
removeAllShapes
public void removeAllShapes()
Description copied from interface:ContainerRemoves all contained shapes, w/odestroyingthem.- Specified by:
removeAllShapesin interfaceContainer
-
removeAllShapes
public void removeAllShapes(GL2ES2 gl)
Removes all given shapes and destroys them.
-
getShapeByIdx
public Shape getShapeByIdx(int id)
-
getShapeByName
public Shape getShapeByName(int name)
-
getSampleCount
public int getSampleCount()
-
setSampleCount
public int setSampleCount(int v)
-
setAllShapesQuality
public void setAllShapesQuality(int q)
-
setAllShapesSharpness
public void setAllShapesSharpness(float sharpness)
-
markAllShapesDirty
public void markAllShapesDirty()
-
setDebugBorderBox
public final void setDebugBorderBox(float v)
Sets the debugborderthickness for all existing or added shapes, zero for no debug border (default).- Parameters:
v- thickness debug border, zero for no border
-
init
public void init(GLAutoDrawable drawable)
Description copied from interface:GLEventListenerCalled 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.
- Specified by:
initin interfaceGLEventListener
-
reshape
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
Reshape scene using#setupMatrix(PMVMatrix, int, int, int, int)usingScene.PMVMatrixSetup.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.- Specified by:
reshapein interfaceGLEventListener- Parameters:
drawable- the triggeringGLAutoDrawablex- lower left corner of the viewport rectangle in pixel unitsy- lower left corner of the viewport rectangle in pixel unitswidth- width of the viewport rectangle in pixel unitsheight- height of the viewport rectangle in pixel units- See Also:
Scene.PMVMatrixSetup,setPMVMatrixSetup(PMVMatrixSetup),#setupMatrix(PMVMatrix, int, int, int, int),getBounds(),#getBoundsCenter()
-
display
public void display(GLAutoDrawable drawable)
Description copied from interface:GLEventListenerCalled 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 ifsetAutoSwapBufferModeis enabled.- Specified by:
displayin interfaceGLEventListener
-
waitUntilDisplayed
public void waitUntilDisplayed()
Blocks until firstdisplay(GLAutoDrawable)has completed after construction or {@link #dispose(GLAutoDrawable).
-
dispose
public void dispose(GLAutoDrawable drawable)
Disposes alladdedShapes.Implementation also issues
RegionRenderer.destroy(GL2ES2)if set anddetachInputListenerFrom(GLWindow)in case the drawable is of typeGLWindow.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
GLAutoDrawableclosing an attached window, but also manually by callingdestroy.Note that this event does not imply the end of life of the application. It could be produced with a followup call to
GLEventListener.init(GLAutoDrawable)in case the GLContext has been recreated, e.g. due to a pixel configuration change in a multihead environment.- Specified by:
disposein interfaceGLEventListener
-
pickShape
public Shape pickShape(PMVMatrix pmv, int glWinX, int glWinY, Vec3f objPos, Shape[] shape, Runnable runnable)
Attempt to pick aShapeusing the window coordinates and contained 'sAABBoxboundsusing a ray-intersection algorithm.If
Shapewas found the given action is performed.Method performs on current thread and returns after probing every
Shape.- Parameters:
pmv- a newPMVMatrixwhich willbe setup,shape-transformedand can be reused by the caller and runnable.glWinX- window X coordinate, bottom-left originglWinY- window Y coordinate, bottom-left originobjPos- storage for found object position in model-space of foundShapeshape- storage for foundShapeor nullrunnable- the action to perform ifShapewas found- Returns:
- picked Shape if any or null as stored in
shape
-
pickShapeGL
public void pickShapeGL(int glWinX, int glWinY, Vec3f objPos, Shape[] shape, Runnable runnable)
-
winToShapeCoord
public void winToShapeCoord(Shape shape, int glWinX, int glWinY, PMVMatrix pmv, Vec3f objPos, Runnable runnable)
CallingShape#winToObjCoord(Scene, int, int, float[]), retrieving its Shape object position.- Parameters:
shape-glWinX- in GL window coordinates, origin bottom-leftglWinY- in GL window coordinates, origin bottom-leftpmv- a newPMVMatrixwhich willbe setup,shape-transformedand can be reused by the caller and runnable.objPos- resulting object positionrunnable- action
-
forOne
public boolean forOne(PMVMatrix pmv, Shape shape, Runnable action)
Traverses through the graph up untilshapeand applyactionon it.- Specified by:
forOnein interfaceContainer- Parameters:
pmv-PMVMatrix, which shall be properly initialized, e.g. viasetupMatrix(PMVMatrix)shape-action-- Returns:
- true to signal operation complete, i.e.
shapefound, otherwise false
-
forAll
public boolean forAll(PMVMatrix pmv, Shape.Visitor2 v)
Traverses through the graph and applyShape.Visitor2.visit(Shape, PMVMatrix)for each, stop if it returns true.- Specified by:
forAllin interfaceContainer- Parameters:
pmv-PMVMatrix, which shall be properly initialized, e.g. viasetupMatrix(PMVMatrix)v-- Returns:
- true to signal operation complete and to stop traversal, i.e.
Shape.Visitor2.visit(Shape, PMVMatrix)returned true, otherwise false
-
forAll
public boolean forAll(Shape.Visitor1 v)
Traverses through the graph and applyShape.Visitor1.visit(Shape)for each, stop if it returns true.- Specified by:
forAllin interfaceContainer- Parameters:
v-- Returns:
- true to signal operation complete and to stop traversal, i.e.
Shape.Visitor1.visit(Shape)returned true, otherwise false
-
forSortedAll
public boolean forSortedAll(Comparator<Shape> sortComp, PMVMatrix pmv, Shape.Visitor2 v)
Traverses through the graph and applyVisitor#visit(Shape, PMVMatrix)for each, stop if it returns true. EachContainerlevel is sorted usingsortComp- Specified by:
forSortedAllin interfaceContainer- Parameters:
sortComp-pmv-v-- Returns:
- true to signal operation complete and to stop traversal, i.e.
Shape.Visitor2.visit(Shape, PMVMatrix)returned true, otherwise false
-
getPMVMatrixSetup
public final Scene.PMVMatrixSetup getPMVMatrixSetup()
Return the default orsetPMVMatrixSetup(PMVMatrixSetup)Scene.PMVMatrixSetup.
-
setPMVMatrixSetup
public final void setPMVMatrixSetup(Scene.PMVMatrixSetup setup)
Set a customScene.PMVMatrixSetup.
-
getDefaultPMVMatrixSetup
public static Scene.PMVMatrixSetup getDefaultPMVMatrixSetup()
Return the defaultScene.PMVMatrixSetup.
-
setupMatrix
public void setupMatrix(PMVMatrix pmv, Recti viewport)
SetupPMVMatrixGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWby callinggetPMVMatrixSetup()'sScene.PMVMatrixSetup.set(PMVMatrix, Recti).- Parameters:
pmv- thePMVMatrixto setupRecti- viewport
-
setupMatrix
public void setupMatrix(PMVMatrix pmv)
SetupPMVMatrixGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWusing implicitgetViewport()surface dimension by callinggetPMVMatrixSetup()'sScene.PMVMatrixSetup.set(PMVMatrix, Recti).- Parameters:
pmv- thePMVMatrixto setup
-
getViewport
public final Recti getViewport(Recti target)
Copies the current int[4] viewport in given target and returns it for chaining. It is set after initialreshape(GLAutoDrawable, int, int, int, int).
-
getViewport
public Recti getViewport()
Borrows the current int[4] viewport w/o copying. It is set after initialreshape(GLAutoDrawable, int, int, int, int).
-
getWidth
public int getWidth()
Returns thegetViewport()'s width, set after initialreshape(GLAutoDrawable, int, int, int, int).
-
getHeight
public int getHeight()
Returns thegetViewport()'s height, set after initialreshape(GLAutoDrawable, int, int, int, int).
-
getBounds
public AABBox getBounds()
Describing the scene's object model-dimensions of the plane at scene-distance covering the visible viewport rectangle.The value is evaluated at
reshape(GLAutoDrawable, int, int, int, int)viaAABBox.getWidth()andAABBox.getHeight()define scene's dimension covered by surface size.AABBoxis setup viagetPMVMatrixSetup()'sScene.PMVMatrixSetup.setPlaneBox(AABBox, PMVMatrix, Recti).The default
Scene.PMVMatrixSetupimplementation scales to normalized plane dimensions, 1 for the greater of width and height.
-
winToPlaneCoord
public static void winToPlaneCoord(PMVMatrix pmv, Recti viewport, float zNear, float zFar, float winX, float winY, float objOrthoZ, Vec3f objPos)
- Parameters:
pmv-viewport-zNear-zFar-winX-winY-objOrthoZ-objPos- float[3] storage for object coord resultwinZ-
-
surfaceToPlaneSize
public void surfaceToPlaneSize(Recti viewport, float zNear, float zFar, float objOrthoDist, Vec2f objSceneSize)
Map given window surface-size to object coordinates relative to this scene using the give projection parameters.- Parameters:
viewport- viewport rectanglezNear- customDEFAULT_ZNEARzFar- customDEFAULT_ZFARobjOrthoDist- customDEFAULT_SCENE_DISTobjSceneSize- Vec2f storage for object surface size result
-
surfaceToPlaneSize
public void surfaceToPlaneSize(Recti viewport, Vec2f objSceneSize)
Map given window surface-size to object coordinates relative to this scene using the defaultScene.PMVMatrixSetup, i.e.DEFAULT_ZNEAR,DEFAULT_ZFARandDEFAULT_SCENE_DIST- Parameters:
viewport- viewport rectangleobjSceneSize- Vec2f storage for object surface size result
-
getActiveShape
public final Shape getActiveShape()
-
releaseActiveShape
public void releaseActiveShape()
-
getStatusText
public String getStatusText(GLAutoDrawable glad, int renderModes, int quality, float dpi)
Return a formatted status string containing avg fps and avg frame duration.- Parameters:
glad- GLAutoDrawable instance for FPSCounter, its chosen GLCapabilities and its GL's swap-intervalrenderModes- render modes forRegion.getRenderModeString(int, int, int)quality- the Graph-Curve quality setting or -1 to be ignoreddpi- the monitor's DPI (vertical preferred)- Returns:
- formatted status string
-
getStatusText
public static String getStatusText(FPSCounter fpsCounter)
Return a formatted status string containing avg fps and avg frame duration.- Parameters:
fpsCounter- the counter, must not be null- Returns:
- formatted status string
-
nextScreenshotFile
public File nextScreenshotFile(String dir, String prefix, int renderModes, GLCapabilitiesImmutable caps, String contentDetail)
Return the unique next technical screenshot PNGFileinstance as follows:filename = [{dir}][{prefix}-]Implementation incrementsRegion.getRenderModeString(int, int, int)[-{contentDetails}]-snap{screenShotCount}-{resolution}.pnggetScreenshotCount().- Parameters:
dir- the target directory, may be `null` or an empty stringprefix- the prefix, may be `null` or an empty stringrenderModes- the used Graph renderModes, seecreate(..)caps- the usedGLCapabilitiesImmutableused to retrieved the full-screen AA (fsaa)GLCapabilitiesImmutable.getNumSamples()contentDetail- user content details to be added at the end but beforegetScreenshotCount(), may be `null` or an empty string- Returns:
- a unique descriptive screenshot filename
- See Also:
screenshot(GL, File),screenshot(boolean, File),getScreenshotCount()
-
getScreenshotCount
public int getScreenshotCount()
Return the number ofnextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String)calls.
-
screenshot
public void screenshot(GL gl, File file)
Write current read drawable (screen) to a file.Best to be
invoked on the display call, see#screenshot(boolean, String).- Parameters:
gl- current GL objectfile- the target file to be used, consider usingnextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String)- See Also:
nextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String),getScreenshotCount(),screenshot(boolean, File)
-
screenshot
public void screenshot(boolean wait, File file)Write current read drawable (screen) to a file onon the display call.- Parameters:
wait- if true block until execution of screenshotGLRunnableis finished, otherwise return immediately w/o waitingfile- the target file to be used, consider usingnextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String)- See Also:
nextScreenshotFile(String, String, int, GLCapabilitiesImmutable, String),getScreenshotCount(),screenshot(GL, File)
-
-