Encapsulates OpenGL ES 2.0 frame buffer objects. This is a simple helper class which should cover most FBO uses. It will
automatically create a texture for the color attachment and a renderbuffer for the depth buffer. You can get a hold of the
texture by FrameBuffer#getColorBufferTexture(). This class will only work with OpenGL ES 2.0.
FrameBuffers are managed. In case of an OpenGL context loss, which only happens on Android when a user switches to another application or receives an incoming call, the framebuffer will be automatically recreated.
A FrameBuffer must be disposed if it is no longer needed
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| protected | FrameBuffer(GLFrameBuffer.
Creates a GLFrameBuffer from the specifications provided by bufferBuilder |
| public | FrameBuffer(Pixmap.
Creates a new FrameBuffer having the given dimensions and potentially a depth buffer attached. |
| public | FrameBuffer(Pixmap.
the format of the color buffer; according to the OpenGL ES 2.0 spec, only RGB565, RGBA4444 and RGB5_A1 are
color-renderable format,the width of the framebuffer in pixels width, int the height of the framebuffer in pixels height, boolean whether to attach a depth buffer hasDepth, boolean hasStencil)Creates a new FrameBuffer having the given dimensions and potentially a depth and a stencil buffer attached. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | attachFrameBufferColorTexture(Texture texture)
Implements abstract com. Override this method in a derived class to attach the backing texture to the GL framebuffer object. |
| protected Texture | createTexture(GLFrameBuffer.
Implements abstract com. Override this method in a derived class to set up the backing texture as you like. |
| protected void | disposeColorTexture(Texture colorTexture)
Implements abstract com. Override this method in a derived class to dispose the backing texture as you like. |
| public static void |
| FrameBuffer | back to summary |
|---|---|
| pack-priv FrameBuffer() | |
| FrameBuffer | back to summary |
|---|---|
| protected FrameBuffer(GLFrameBuffer. Creates a GLFrameBuffer from the specifications provided by bufferBuilder | |
| FrameBuffer | back to summary |
|---|---|
| public FrameBuffer(Pixmap. Creates a new FrameBuffer having the given dimensions and potentially a depth buffer attached. | |
| FrameBuffer | back to summary |
|---|---|
| public FrameBuffer(Pixmap. Creates a new FrameBuffer having the given dimensions and potentially a depth and a stencil buffer attached.
| |
| attachFrameBufferColorTexture | back to summary |
|---|---|
| protected void attachFrameBufferColorTexture(Texture texture) Implements abstract com. Doc from com. Override this method in a derived class to attach the backing texture to the GL framebuffer object.
| |
| createTexture | back to summary |
|---|---|
| protected Texture createTexture(GLFrameBuffer. Implements abstract com. Doc from com. Override this method in a derived class to set up the backing texture as you like.
| |
| disposeColorTexture | back to summary |
|---|---|
| protected void disposeColorTexture(Texture colorTexture) Implements abstract com. Doc from com. Override this method in a derived class to dispose the backing texture as you like.
| |
| unbind | back to summary |
|---|---|
| public static void unbind() Hides com. | |