Skip to content

FrameBufferHandle

abstract class FrameBufferHandle<T extends Texture>
Implements: IFrameBuffer
Known subtypes: GlFrameBuffer, VulkanFrameBuffer
Package: dev.joid.lib.bridge.render.framebuffer · Module: core · Source: FrameBufferHandle.java

The base class of a framebuffer, which owns its color texture and deletes it with its own handle.

ReturnsSignatureSummary
FrameBufferHandle(T texture) protectedCreates the framebuffer around its color texture.

ReturnsSignatureSummary
voiddelete()Deletes the handle, then the color texture; does nothing the second time.
intgetWidth()Returns the width of the color texture, in pixels.
intgetHeight()Returns the height of the color texture, in pixels.
TgetTexture()Returns the color texture, which a shader samples once the framebuffer is drawn.
booleanisDeleted()If true, the framebuffer is deleted.
ReturnsSignatureSummary
voiddeleteHandle() hook abstract protectedJOID calls it once, from delete(), before it deletes the color texture.

FrameBufferHandle(T texture) protected

Creates the framebuffer around its color texture.

void delete()

Deletes the handle, then the color texture; does nothing the second time.

int getWidth()

Returns the width of the color texture, in pixels.

int getHeight()

Returns the height of the color texture, in pixels.

T getTexture()

Returns the color texture, which a shader samples once the framebuffer is drawn.

boolean isDeleted()

If true, the framebuffer is deleted.

void deleteHandle() hook abstract protected

JOID calls it once, from delete(), before it deletes the color texture. Delete the framebuffer and its depth buffer.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page