Top Inners Constructors Methods
jogamp.opengl

public Class GLOffscreenAutoDrawableImpl

extends GLAutoDrawableDelegate
implements GLOffscreenAutoDrawable
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.GLOffscreenAutoDrawable, com.jogamp.opengl.GLSharedContextSetter, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.nativewindow.NativeSurfaceHolder
Known Direct Subclasses
jogamp.opengl.GLOffscreenAutoDrawableImpl.FBOImpl
Imports
com.jogamp.nativewindow.NativeWindowException, com.jogamp.opengl.GL, .GLContext, .GLDrawable, .GLException, .GLOffscreenAutoDrawable, .FBObject, .GLAutoDrawableDelegate, com.jogamp.common.util.locks.RecursiveLock, jogamp.opengl.GLFBODrawableImpl

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Constructor Summary

AccessConstructor and Description
public
GLOffscreenAutoDrawableImpl(final GLDrawable
a valid GLDrawable, may not be realized yet.
drawable
,
final GLContext
a valid GLContext, may not have been made current (created) yet, may not be associated w/ drawable yet, may be null for lazy initialization at 1st display().
context
,
final Object
optional UI element holding this instance, see getUpstreamWidget().
upstreamWidget
,
final RecursiveLock
optional upstream lock, may be null
lock
)

Method Summary

Modifier and TypeMethod and Description
public void
setSurfaceSize(final int
new width in pixel units
newWidth
,
final int
new height in pixel units
newHeight
)

Implements com.jogamp.opengl.GLOffscreenAutoDrawable.setSurfaceSize.

Resize this GLAutoDrawable's surface
Inherited from com.jogamp.opengl.GLAutoDrawableDelegate:
destroydestroyImplInLockdisplaygetFactorygetUpstreamLockgetUpstreamWidgetsetUpstreamWidgetswapBufferstoStringwindowDestroyNotifyOpwindowRepaintOpwindowResizedOp

Constructor Detail

GLOffscreenAutoDrawableImplback to summary
public GLOffscreenAutoDrawableImpl(final GLDrawable drawable, final GLContext context, final Object upstreamWidget, final RecursiveLock lock)
Parameters
drawable:GLDrawable

a valid GLDrawable, may not be realized yet.

context:GLContext

a valid GLContext, may not have been made current (created) yet, may not be associated w/ drawable yet, may be null for lazy initialization at 1st display().

upstreamWidget:Object

optional UI element holding this instance, see getUpstreamWidget().

lock:RecursiveLock

optional upstream lock, may be null

Method Detail

setSurfaceSizeback to summary
public void setSurfaceSize(final int newWidth, final int newHeight) throws NativeWindowException, GLException

Implements com.jogamp.opengl.GLOffscreenAutoDrawable.setSurfaceSize.

Doc from com.jogamp.opengl.GLOffscreenAutoDrawable.setSurfaceSize.

Resize this GLAutoDrawable's surface

Parameters
newWidth:int

new width in pixel units

newHeight:int

new height in pixel units

Annotations
@Override
Exceptions
NativeWindowException:
in case the surface could no be locked
GLException:
in case of an error during the resize operation
jogamp.opengl back to summary

public Class GLOffscreenAutoDrawableImpl.FBOImpl

extends GLOffscreenAutoDrawableImpl
implements FBO
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.GLOffscreenAutoDrawable.FBO, com.jogamp.opengl.GLFBODrawable, com.jogamp.opengl.GLDrawable, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.opengl.GLOffscreenAutoDrawable, com.jogamp.opengl.GLSharedContextSetter, com.jogamp.opengl.GLAutoDrawable

Constructor Summary

AccessConstructor and Description
public
FBOImpl(final GLFBODrawableImpl
a valid GLDrawable, may not be realized yet.
drawable
,
final GLContext
a valid GLContext, may not have been made current (created) yet, may not be associated w/ drawable yet, may be null for lazy initialization
context
,
final Object
optional UI element holding this instance, see getUpstreamWidget().
upstreamWidget
,
final RecursiveLock
optional upstream lock, may be null
lock
)

Method Summary

Modifier and TypeMethod and Description
public final FBObject.Colorbuffer
getColorbuffer(final int
GL#GL_FRONT and GL#GL_BACK are valid buffer names
bufferName
)

Implements com.jogamp.opengl.GLFBODrawable.getColorbuffer.

Returns the named Colorbuffer instance.
public final FBObject
getFBObject(final int
GL#GL_FRONT and GL#GL_BACK are valid buffer names
bufferName
)

Implements com.jogamp.opengl.GLFBODrawable.getFBObject.

// TODO: Add or remove TEXTURE (only) DoubleBufferMode support
public final int
public final int
public final int
public final int
public boolean
public void
resetSize(final GL
GL context object bound to this drawable, will be made current during operation. A prev. current context will be make current after operation.
gl
)

Implements com.jogamp.opengl.GLFBODrawable.resetSize.

Notify this instance about upstream size change to reconfigure the FBObject.
public final void
setFBOMode(final int
custom FBO mode bits like FBOMODE_USE_TEXTURE.
modeBits
)

Implements com.jogamp.opengl.GLFBODrawable.setFBOMode.

Set the FBO mode bits used for FBO creation.
public final int
setNumBuffers(final int bufferCount)

Implements com.jogamp.opengl.GLFBODrawable.setNumBuffers.

Sets the number of buffers (FBO) being used if using double buffering.
public final void
setNumSamples(final GL
GL context object bound to this drawable, will be made current during operation. A prev. current context will be make current after operation.
gl
,
final int
new sample size
newSamples
)

Implements com.jogamp.opengl.GLFBODrawable.setNumSamples.

Set the number of sample buffers if using MSAA
public final void
setTextureUnit(final int
the texture unit to be used
unit
)

Implements com.jogamp.opengl.GLFBODrawable.setTextureUnit.

Inherited from jogamp.opengl.GLOffscreenAutoDrawableImpl:
setSurfaceSize

Constructor Detail

FBOImplback to summary
public FBOImpl(final GLFBODrawableImpl drawable, final GLContext context, final Object upstreamWidget, final RecursiveLock lock)
Parameters
drawable:GLFBODrawableImpl

a valid GLDrawable, may not be realized yet.

context:GLContext

a valid GLContext, may not have been made current (created) yet, may not be associated w/ drawable yet, may be null for lazy initialization

upstreamWidget:Object

optional UI element holding this instance, see getUpstreamWidget().

lock:RecursiveLock

optional upstream lock, may be null

Method Detail

getColorbufferback to summary
public final FBObject.Colorbuffer getColorbuffer(final int bufferName)

Implements com.jogamp.opengl.GLFBODrawable.getColorbuffer.

Doc from com.jogamp.opengl.GLFBODrawable.getColorbuffer.

Returns the named Colorbuffer instance.

If MSAA is being used, only the GL#GL_FRONT buffer is accessible and an exception is being thrown if GL#GL_BACK is being requested.

Depending on the fbo mode the resulting Colorbuffer is either a TextureAttachment if FBOMODE_USE_TEXTURE is set, otherwise a ColorAttachment. See Colorbuffer#isTextureAttachment().

Parameters
bufferName:int

GL#GL_FRONT and GL#GL_BACK are valid buffer names

Returns:FBObject.Colorbuffer

the named Colorbuffer

Annotations
@Override
getFBObjectback to summary
public final FBObject getFBObject(final int bufferName)

Implements com.jogamp.opengl.GLFBODrawable.getFBObject.

// TODO: Add or remove TEXTURE (only) DoubleBufferMode support

Parameters
bufferName:int

Doc from com.jogamp.opengl.GLFBODrawable.getFBObject.

GL#GL_FRONT and GL#GL_BACK are valid buffer names

Returns:FBObject

Doc from com.jogamp.opengl.GLFBODrawable.getFBObject.

the named FBObject

Annotations
@Override
getFBOModeback to summary
public final int getFBOMode()

Implements com.jogamp.opengl.GLFBODrawable.getFBOMode.

Returns:int

Doc from com.jogamp.opengl.GLFBODrawable.getFBOMode.

the used FBO mode bits, mutable via setFBOMode(int)

Annotations
@Override
getNumBuffersback to summary
public final int getNumBuffers()

Implements com.jogamp.opengl.GLFBODrawable.getNumBuffers.

Returns:int

Doc from com.jogamp.opengl.GLFBODrawable.getNumBuffers.

the number of buffers (FBO) being used. 1 if not using double buffering, otherwise ≥ 2, depending on setNumBuffers(int).

Annotations
@Override
getNumSamplesback to summary
public final int getNumSamples()

Implements com.jogamp.opengl.GLFBODrawable.getNumSamples.

Returns:int

Doc from com.jogamp.opengl.GLFBODrawable.getNumSamples.

the number of sample buffers if using MSAA, otherwise 0

Annotations
@Override
getTextureUnitback to summary
public final int getTextureUnit()

Implements com.jogamp.opengl.GLFBODrawable.getTextureUnit.

Returns:int

Doc from com.jogamp.opengl.GLFBODrawable.getTextureUnit.

the used texture unit

Annotations
@Override
isInitializedback to summary
public boolean isInitialized()

Implements com.jogamp.opengl.GLFBODrawable.isInitialized.

Returns:boolean

Doc from com.jogamp.opengl.GLFBODrawable.isInitialized.

true if initialized, i.e. a GLContext is bound and made current once, otherwise false.

Annotations
@Override
resetSizeback to summary
public void resetSize(final GL gl) throws GLException

Implements com.jogamp.opengl.GLFBODrawable.resetSize.

Doc from com.jogamp.opengl.GLFBODrawable.resetSize.

Notify this instance about upstream size change to reconfigure the FBObject.

Parameters
gl:GL

GL context object bound to this drawable, will be made current during operation. A prev. current context will be make current after operation.

Annotations
@Override
Exceptions
GLException:
if resize operation failed
setFBOModeback to summary
public final void setFBOMode(final int modeBits) throws IllegalStateException

Implements com.jogamp.opengl.GLFBODrawable.setFBOMode.

Doc from com.jogamp.opengl.GLFBODrawable.setFBOMode.

Set the FBO mode bits used for FBO creation.

Default value is: FBOMODE_USE_TEXTURE.

If GLRendererQuirks#BuggyColorRenderbuffer is set, FBOMODE_USE_TEXTURE is always added at initialization.

Parameters
modeBits:int

custom FBO mode bits like FBOMODE_USE_TEXTURE.

Annotations
@Override
Exceptions
IllegalStateException:
if already initialized, see isInitialized().
setNumBuffersback to summary
public final int setNumBuffers(final int bufferCount) throws GLException

Implements com.jogamp.opengl.GLFBODrawable.setNumBuffers.

Doc from com.jogamp.opengl.GLFBODrawable.setNumBuffers.

Sets the number of buffers (FBO) being used if using double buffering.

If double buffering is not chosen, this is a NOP.

Must be called before initialization, otherwise an exception is thrown.

Returns:int

the new number of buffers (FBO) used, maybe different than the requested bufferCount (see above)

Annotations
@Override
setNumSamplesback to summary
public final void setNumSamples(final GL gl, final int newSamples) throws GLException

Implements com.jogamp.opengl.GLFBODrawable.setNumSamples.

Doc from com.jogamp.opengl.GLFBODrawable.setNumSamples.

Set the number of sample buffers if using MSAA

Parameters
gl:GL

GL context object bound to this drawable, will be made current during operation. A prev. current context will be make current after operation.

newSamples:int

new sample size

Annotations
@Override
Exceptions
GLException:
if resetting the FBO failed
setTextureUnitback to summary
public final void setTextureUnit(final int unit)

Implements com.jogamp.opengl.GLFBODrawable.setTextureUnit.

Parameters
unit:int

Doc from com.jogamp.opengl.GLFBODrawable.setTextureUnit.

the texture unit to be used

Annotations
@Override