GLProfiles.
Supports on-the-fly reconfiguration of dimension and multisample buffers via reset(GL, int, int, int, boolean)
while preserving the Attachment references.
Integrates default read/write framebuffers via GLContext#getDefaultReadFramebuffer() and GLContext#getDefaultReadFramebuffer(),
which is being hooked at GL#glBindFramebuffer(int, int) when the default (zero) framebuffer is selected.
FIXME: Implement support for Type#DEPTH_TEXTURE, Type#STENCIL_TEXTURE .
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | FBObject.
Common super class of all FBO attachments |
| public static class | FBObject.
Color render buffer FBO attachment |
| public static interface | FBObject.
Generic color buffer FBO attachment, either of type |
| private static enum | |
| public static class | FBObject.
Other renderbuffer attachment which maybe a colorbuffer, depth or stencil. |
| public static class | FBObject.
Texture FBO attachment |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| public static final int | CHOSEN_BITS
Request current context drawable's chosen
|
| private FBObject. | |
| private int | |
| protected static final boolean | |
| public static final int | DEFAULT_BITS
Request default bit count for depth- or stencil buffer (depth 24 bits, stencil 8 bits), value |
| private FBObject. | |
| private boolean | |
| private boolean | |
| private int | |
| private static final boolean | |
| private boolean | |
| private int | |
| private boolean | |
| private boolean | |
| private int | |
| public static final int | MAXIMUM_BITS
Request maximum bit count for depth- or stencil buffer (depth 32 bits, stencil 16 bits), value |
| private int | |
| private int | |
| private int | |
| private boolean | |
| private boolean | |
| public static final int | REQUESTED_BITS
Request current context drawable's requested
|
| private boolean | |
| private int | |
| private FBObject. | |
| private FBObject | |
| private boolean | |
| private FBObject. | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private static final int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private final void | |
| public final FBObject. | Returns: ColorAttachment instance describing the new attached colorbuffer if bound and configured successfully, otherwise GLException is thrownthe current GL context gl, final int the color attachment point ranging from [0.. attachmentPoint, final boolean getMaxColorAttachments()-1]set to alpha)true if you request alpha channel, otherwise false;Attaches a newly created and |
| public final FBObject. | Returns: ColorAttachment instance describing the new attached colorbuffer if bound and configured successfully, otherwise GLException is thrownthe current GL context gl, final int the color attachment point ranging from [0.. attachmentPoint, final int internalFormat)getMaxColorAttachments()-1]Attaches a newly created and |
| public final FBObject. | Returns: givenColorbuffer instance if bound and configured successfully, otherwise GLException is thrownthe color attachment point ranging from [0.. attachmentPoint, final FBObject.getMaxColorAttachments()-1]the to be attached colbufColorbufferAttaches a |
| private final FBObject. | |
| public final void | attachRenderbuffer(final GL gl, final FBObject.
desired bits for depth or stencil,
may use generic values reqBits)DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS or MAXIMUM_BITS.Attaches one depth, stencil or packed-depth-stencil buffer to this FBO's instance, selecting the internalFormat automatically. |
| public final void | attachRenderbuffer(final GL
the current GL context gl, final int internalFormat)Attaches one depth, stencil or packed-depth-stencil buffer to this FBO's instance,
depending on the |
| protected final void | |
| private final void | attachRenderbufferImpl2(final GL gl, final FBObject.
|
| public final FBObject. | Returns: TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrownthe current GL context gl, final int the color attachment point ranging from [0.. attachmentPoint, final boolean getMaxColorAttachments()-1]set to alpha)true if you request alpha channel, otherwise false;Attaches a |
| public final FBObject. | Returns: TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrownthe current GL context gl, final int the color attachment point ranging from [0.. attachmentPoint, final boolean getMaxColorAttachments()-1]set to alpha, final int true if you request alpha channel, otherwise false;if > 0 value for magFilter, final int GL#GL_TEXTURE_MAG_FILTERif > 0 value for minFilter, final int GL#GL_TEXTURE_MIN_FILTERif > 0 value for wrapS, final int GL#GL_TEXTURE_WRAP_Sif > 0 value for wrapT)GL#GL_TEXTURE_WRAP_TAttaches a |
| public final FBObject. | Returns: TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrownthe current GL context gl, final int the color attachment point ranging from [0.. attachmentPoint, final int getMaxColorAttachments()-1]internalFormat parameter to internalFormat, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)format parameter to dataFormat, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)type parameter to dataType, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)if > 0 value for magFilter, final int GL#GL_TEXTURE_MAG_FILTERif > 0 value for minFilter, final int GL#GL_TEXTURE_MIN_FILTERif > 0 value for wrapS, final int GL#GL_TEXTURE_WRAP_Sif > 0 value for wrapT)GL#GL_TEXTURE_WRAP_TAttaches a |
| public final void | bind(final GL
the current GL context gl)Bind this FBO, i.e. bind write framebuffer to |
| private final void | |
| private final boolean | |
| private static int | |
| public final FBObject. | Returns: uninitialized ColorAttachment instance describing the new attached colorbufferset to alpha)true if you request alpha channel, otherwise false;Creates a |
| public static final FBObject. | Returns: uninitialized ColorAttachment instance describing the new attached colorbufferset to internalFormat, final int samples, final int width, final int height)true if you request alpha channel, otherwise false;Creates a |
| public static final FBObject. | Returns: the created and uninitialized colorTextureAttachmentset to alpha, final int true if you request alpha channel, otherwise false;texture width width, final int texture height height)Creates a color |
| public static final FBObject. | Returns: the created and uninitialized colorTextureAttachmentset to alpha, final int true if you request alpha channel, otherwise false;texture width width, final int texture height height, final int if > 0 value for magFilter, final int GL#GL_TEXTURE_MAG_FILTERif > 0 value for minFilter, final int GL#GL_TEXTURE_MIN_FILTERif > 0 value for wrapS, final int GL#GL_TEXTURE_WRAP_Sif > 0 value for wrapT)GL#GL_TEXTURE_WRAP_TCreates a color |
| public static final FBObject. | createColorTextureAttachment(final GL gl, final int internalFormat, final int width, final int height, final int magFilter, final int minFilter, final int wrapS, final int wrapT)
|
| public static final FBObject. | Returns: the created and uninitialized colorTextureAttachmentinternalFormat parameter to internalFormat, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)texture width width, final int texture height height, final int format parameter to dataFormat, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)type parameter to dataType, final int GL#glTexImage2D(int, int, int, int, int, int, int, int, long)if > 0 value for magFilter, final int GL#GL_TEXTURE_MAG_FILTERif > 0 value for minFilter, final int GL#GL_TEXTURE_MIN_FILTERif > 0 value for wrapS, final int GL#GL_TEXTURE_WRAP_Sif > 0 value for wrapT)GL#GL_TEXTURE_WRAP_TCreates a color |
| public static final FBObject. | createRenderAttachment(final FBObject.
|
| public final void | |
| public final void | detachAll(final GL
the current GL context gl)Detaches all |
| public final void | detachAllColorbuffer(final GL
the current GL context gl)Detaches all |
| private final void | detachAllImpl(final GL gl, final boolean detachNonColorbuffer, final boolean recreate, final int sampleCountChange)
|
| public final void | |
| public final void | detachAllTexturebuffer(final GL
the current GL context gl)Detaches all |
| public final FBObject. | Returns: the detached Colorbuffertrue if the Colorbuffer shall be disposed dispose)Detaches a |
| private final FBObject. | detachColorbufferImpl(final GL gl, final int attachmentPoint, final FBObject.
|
| public final void | detachRenderbuffer(final GL gl, final FBObject.
true if the Colorbuffer shall be disposed dispose)
|
| private final FBObject. | detachRenderbufferImpl(final GL gl, FBObject.
|
| public final void | formatToGLCapabilities(final GLCapabilities
the destination for format bits caps)Writes the internal format of the attachments to the given GLCapabilities object. |
| private final void | |
| private final void | |
| public final FBObject. | getColorbuffer(final int attachmentPoint)
Return the |
| public final FBObject. | getColorbuffer(final FBObject.
Returns the passed |
| public final int | getColorbufferAttachmentPoint(final FBObject.
the caColorbuffer to look for.Finds the passed |
| public final int | |
| public final int | |
| public final FBObject. | |
| private final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final FBObject. | |
| public final FBObject | |
| public final int | Returns: The FB status.GL. if ok, otherwise return GL FBO error state or -1Note that the status may reflect an incomplete state during transition of attachments. |
| public final String | |
| public static final String | |
| public final FBObject. | |
| private final int | |
| public final int | |
| public final int | |
| public final int | |
| private static boolean | |
| public final boolean | |
| public final boolean | |
| public void | init(final GL
the current GL context gl, final int the initial width, it's minimum is capped to 1 newWidth, final int the initial height, it's minimum is capped to 1 newHeight, final int if > 0, MSAA will be used, otherwise no multisampling. Will be capped to newSamples)getMaxSamples().Initializes this FBO's instance. |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | isInitialized()
Returns |
| public final boolean | isModified()
Returns |
| public final boolean | isSamplingBufferDirty()
Returns |
| public final boolean | |
| public final void | markUnbound()
Method simply marks this FBO unbound w/o interfering w/ the bound framebuffer as perfomed by |
| pack-priv int | |
| private final void | |
| public final boolean | Returns: true if this instance has been modified, otherwise false.the current GL context gl, int the new width, it's minimum is capped to 1 newWidth, int the new height, it's minimum is capped to 1 newHeight, int if > 0, MSAA will be used, otherwise no multisampling. Will be capped to newSamples)getMaxSamples().Resets this FBO's instance. |
| public final boolean | Returns: true if this instance has been modified, otherwise false.the current GL context gl)Manually validates the MSAA sampling sink, if used. |
| private final void | resetSizeImpl(final GL
the current GL context gl, final int the new width, it's minimum is capped to 1 newWidth, final int the new height, it's minimum is capped to 1 newHeight)Simply resets this instance's size only, w/o validation. |
| private final boolean | |
| private final boolean | sampleSinkExFormatMismatch(final GL gl)
For GLES3, sampling-sink |
| private final boolean | |
| public FBObject | Returns: the previous sampling sink or null if none was attachedthe new and initialized FBO sampling sink to use, or null to remove current sampling sink newSamplingSink)Setting this FBO sampling sink. |
| public final boolean | supportsDepth(final int
16, 24 or 32 bits bits)Returns |
| public final boolean | |
| public final boolean | supportsRGBA8()
Returns |
| public final boolean | supportsStencil(final int
1, 4, 8 or 16 bits bits)Returns |
| public final void | syncSamplingSink(final GL
the current GL context gl)If multisampling is being used and flagged dirty by a previous call of |
| pack-priv static String | |
| public final String | |
| public final void | unbind(final GL
the current GL context gl)Unbind this FBO, i.e. bind read and write framebuffer to default, see |
| public final void | |
| private final void | |
| public final void | use(final GL
the current GL context gl, final FBObject.TextureAttachment to use, prev. attached w/ attachTexture2D(.,
may be null in case no TextureAttachment is used.
|
| private final void | |
| private void | |
| private final void |