FBObject offscreen GLDrawable implementation, i.e. GLFBODrawable.
It utilizes the context lifecycle hook contextRealized(GLContext, boolean)
to initialize the FBObject instance.
It utilizes the context current hook contextMadeCurrent(context, true)
to bind the FBO.
GLFBODrawable for double buffering details.
GLDrawableImpl#contextRealized(GLContext, boolean), GLDrawableImpl#contextMadeCurrent(GLContext, boolean), GLDrawableImpl#getDefaultDrawFramebuffer(), GLDrawableImpl#getDefaultReadFramebuffer()
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | bufferCount
number of FBOs for double buffering. |
| protected static final boolean | |
| protected static final boolean | |
| private boolean | fboBound
Indicates whether the FBO is bound. |
| private int | |
| private int | |
| private int | |
| private boolean | |
| private FBObject[] | |
| private boolean | fboSwapped
Indicates whether the FBO is swapped, resets to false after makeCurrent -> contextMadeCurrent. |
| private static final String | |
| private boolean | |
| private int | |
| private GLCapabilitiesImmutable | |
| private final GLDrawableImpl | |
| private int | |
| private static volatile boolean | resetQuirkInfoDumped
dump fboResetQuirk info only once pre ClassLoader and only in DEBUG mode |
| private int | |
| private GLFBODrawableImpl. | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected | GLFBODrawableImpl(final GLDrawableFactoryImpl factory, final GLDrawableImpl parent, final NativeSurface surface, final GLCapabilitiesImmutable
the requested FBO capabilities fboCaps, final int textureUnit)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | associateContext(final GLContext
the just bounded or unbounded context glc, final boolean if bound)true create an association, otherwise remove itOverrides jogamp.
|
| protected final void | contextMadeCurrent(final GLContext glc, final boolean current)
Overrides jogamp. makeCurrent, release.
|
| public final GLContext | createContext(final GLContext shareWith)
Implements com. |
| public final FBObject. | getColorbuffer(final int
GL#GL_FRONT and GL#GL_BACK are valid buffer namesImplements com. Colorbuffer instance.
|
| protected final int | getDefaultDrawFramebuffer()
Overrides jogamp. |
| protected final int | getDefaultReadBuffer(final GL gl, final boolean hasDedicatedDrawableRead)
Overrides jogamp. |
| protected final int | getDefaultReadFramebuffer()
Overrides jogamp. |
| public FBObject | getFBObject(final int
GL#GL_FRONT and GL#GL_BACK are valid buffer namesImplements com. |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| private final void | |
| public final boolean | |
| private final void | |
| private final void | |
| public final 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. FBObject.
|
| public final void | setFBOMode(final int
custom FBO mode bits like modeBits)FBOMODE_USE_TEXTURE.Implements com. |
| public final int | setNumBuffers(final int bufferCount)
Implements com. double buffering.
|
| public 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. |
| protected final void | setRealizedImpl()
Implements abstract jogamp. |
| public final void | |
| public final void | setTextureUnit(final int
the texture unit to be used u)Implements com. |
| private final void | |
| protected void | swapBuffersImpl(final boolean
indicates whether double buffering is enabled, see above. doubleBuffered)Implements abstract jogamp. |
| private final void | |
| private final void | |
| public String | toString()
Overrides jogamp. Implements com. |
| bufferCount | back to summary |
|---|---|
| private static final int bufferCount number of FBOs for double buffering. Todo Possible to configure! | |
| DEBUG | back to summary |
|---|---|
| protected static final boolean DEBUG | |
| DEBUG_SWAP | back to summary |
|---|---|
| protected static final boolean DEBUG_SWAP | |
| fboBound | back to summary |
|---|---|
| private boolean fboBound Indicates whether the FBO is bound. | |
| fboIBack | back to summary |
|---|---|
| private int fboIBack | |
| fboIFront | back to summary |
|---|---|
| private int fboIFront | |
| fboModeBits | back to summary |
|---|---|
| private int fboModeBits | |
| fboResetQuirk | back to summary |
|---|---|
| private boolean fboResetQuirk | |
| fbos | back to summary |
|---|---|
| private FBObject[] fbos | |
| fboSwapped | back to summary |
|---|---|
| private boolean fboSwapped Indicates whether the FBO is swapped, resets to false after makeCurrent -> contextMadeCurrent. | |
| illegalBufferName | back to summary |
|---|---|
| private static final String illegalBufferName | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| maxSamples | back to summary |
|---|---|
| private int maxSamples | |
| origParentChosenCaps | back to summary |
|---|---|
| private GLCapabilitiesImmutable origParentChosenCaps | |
| parent | back to summary |
|---|---|
| private final GLDrawableImpl parent | |
| pendingFBOReset | back to summary |
|---|---|
| private int pendingFBOReset | |
| resetQuirkInfoDumped | back to summary |
|---|---|
| private static volatile boolean resetQuirkInfoDumped dump fboResetQuirk info only once pre ClassLoader and only in DEBUG mode | |
| samples | back to summary |
|---|---|
| private int samples | |
| swapBufferContext | back to summary |
|---|---|
| private GLFBODrawableImpl. | |
| texUnit | back to summary |
|---|---|
| private int texUnit | |
| GLFBODrawableImpl | back to summary |
|---|---|
protected GLFBODrawableImpl(final GLDrawableFactoryImpl factory, final GLDrawableImpl parent, final NativeSurface surface, final GLCapabilitiesImmutable fboCaps, final int textureUnit)
| |
| associateContext | back to summary |
|---|---|
| protected void associateContext(final GLContext glc, final boolean bound) Overrides jogamp. Doc from jogamp. Callback for special implementations, allowing
If
If
Being called by | |
| contextMadeCurrent | back to summary |
|---|---|
| protected final void contextMadeCurrent(final GLContext glc, final boolean current) Overrides jogamp. Doc from jogamp. Callback for special implementations, allowing GLContext to trigger GL related lifecycle:
If
If
Being called by
| |
| createContext | back to summary |
|---|---|
| public final GLContext createContext(final GLContext shareWith) Implements com. Doc from com. Creates a new context for drawing to this drawable that will optionally share buffer objects, textures and other server-side OpenGL objects with the specified GLContext.
The GLContext
| |
| getColorbuffer | back to summary |
|---|---|
| public final FBObject. Implements com. Doc from com. Returns the named
If MSAA is being used, only the
Depending on the
| |
| getDefaultDrawFramebuffer | back to summary |
|---|---|
| protected final int getDefaultDrawFramebuffer() Overrides jogamp. Doc from jogamp. Callback for special implementations, allowing GLContext to fetch a custom default render framebuffer. Defaults to zero.
| |
| getDefaultReadBuffer | back to summary |
|---|---|
| protected final int getDefaultReadBuffer(final GL gl, final boolean hasDedicatedDrawableRead) Overrides jogamp. Doc from jogamp. Callback for special implementations, allowing GLContext to fetch a custom default read buffer of current framebuffer.
| |
| getDefaultReadFramebuffer | back to summary |
|---|---|
| protected final int getDefaultReadFramebuffer() Overrides jogamp. Doc from jogamp. Callback for special implementations, allowing GLContext to fetch a custom default read framebuffer. Defaults to zero.
| |
| getFBObject | back to summary |
|---|---|
| public FBObject getFBObject(final int bufferName) throws IllegalArgumentException Implements com. // TODO: Add or remove TEXTURE (only) DoubleBufferMode support
| |
| getFBOMode | back to summary |
|---|---|
| public final int getFBOMode() Implements com.
| |
| getNumBuffers | back to summary |
|---|---|
| public final int getNumBuffers() Implements com.
| |
| getNumSamples | back to summary |
|---|---|
| public final int getNumSamples() Implements com.
| |
| getTextureUnit | back to summary |
|---|---|
| public final int getTextureUnit() Implements com.
| |
| initialize | back to summary |
|---|---|
| private final void initialize(final boolean realize, final GL gl) | |
| isInitialized | back to summary |
|---|---|
| public final boolean isInitialized() Implements com.
| |
| reset | back to summary |
|---|---|
| private final void reset(final GL gl, final int idx, final int width, final int height, final int samples, final boolean useAlpha, final int depthBits, final int stencilBits) | |
| reset | back to summary |
|---|---|
| private final void reset(final GL gl, int newSamples) throws GLException | |
| resetSize | back to summary |
|---|---|
| public final void resetSize(final GL gl) throws GLException Implements com. Doc from com. Notify this instance about upstream size change
to reconfigure the
| |
| setFBOMode | back to summary |
|---|---|
| public final void setFBOMode(final int modeBits) throws IllegalStateException Implements com. Doc from com. Set the FBO mode bits used for FBO creation.
Default value is:
If
| |
| setNumBuffers | back to summary |
|---|---|
| public final int setNumBuffers(final int bufferCount) throws IllegalStateException, GLException Implements com. Doc from com. Sets the number of buffers (FBO) being used if using
If
Must be called before
| |
| setNumSamples | back to summary |
|---|---|
| public void setNumSamples(final GL gl, final int newSamples) throws GLException Implements com. Doc from com. Set the number of sample buffers if using MSAA
| |
| setRealizedImpl | back to summary |
|---|---|
| protected final void setRealizedImpl() Implements abstract jogamp. Doc from jogamp. Platform specific realization of drawable
| |
| setSwapBufferContext | back to summary |
|---|---|
| public final void setSwapBufferContext(final GLFBODrawableImpl. | |
| setTextureUnit | back to summary |
|---|---|
| public final void setTextureUnit(final int u) Implements com.
| |
| setupFBO | back to summary |
|---|---|
| private final void setupFBO(final GL gl, final int idx, final int width, final int height, final int samples, final boolean useAlpha, final int depthBits, final int stencilBits, final boolean useTexture, final boolean setupViewportScissors, final boolean realUnbind) | |
| swapBuffersImpl | back to summary |
|---|---|
| protected void swapBuffersImpl(final boolean doubleBuffered) Implements abstract jogamp. Doc from jogamp. Platform and implementation depending surface swap. The surface is locked.
If
If
| |
| swapFBOImpl | back to summary |
|---|---|
| private final void swapFBOImpl(final GLContext glc) | |
| swapFBOImplPost | back to summary |
|---|---|
| private final void swapFBOImplPost(final GLContext glc) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides jogamp. Implements com. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| protected | ResizeableImpl(final GLDrawableFactoryImpl factory, final GLDrawableImpl parent, final ProxySurface surface, final GLCapabilitiesImmutable fboCaps, final int textureUnit)
|
| Modifier and Type | Method and Description |
|---|---|
| public final void | setSurfaceSize(final GLContext
the context, final int GLContext bound to this drawable, will be made current during operation
A prev. current context will be make current after operation.new width in pixel units newWidth, final int new width in pixel units newHeight)Implements com. GLFBODrawable's surface.
|
| ResizeableImpl | back to summary |
|---|---|
| protected ResizeableImpl(final GLDrawableFactoryImpl factory, final GLDrawableImpl parent, final ProxySurface surface, final GLCapabilitiesImmutable fboCaps, final int textureUnit) | |
| setSurfaceSize | back to summary |
|---|---|
| public final void setSurfaceSize(final GLContext context, final int newWidth, final int newHeight) throws NativeWindowException, GLException Implements com. Doc from com. Resize this This drawable is being locked during operation.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| swapBuffers | back to summary |
|---|---|
| public void swapBuffers(boolean doubleBuffered) | |