FramebufferController

Implement this interface to allow the PolyUI instance to use framebuffers.

This enables many optimizations which can improve performance. There are configuration values in org.polyfrost.polyui.Settings which can be used to control this.

Since

1.7.0

Functions

Link copied to clipboard
abstract fun bindFramebuffer(fbo: Framebuffer)

Bind the given framebuffer.

Link copied to clipboard
abstract fun createFramebuffer(width: Float, height: Float): Framebuffer

Create a new framebuffer. It is down to you (as a rendering implementation) to cache this, and dispose of it as necessary.

Link copied to clipboard
abstract fun delete(fbo: Framebuffer?)

Delete the given framebuffer. Ignore if null.

Link copied to clipboard
abstract fun drawFramebuffer(fbo: Framebuffer, x: Float, y: Float, width: Float = fbo.width, height: Float = fbo.height)

draw the given framebuffer to the screen.

Link copied to clipboard
abstract fun unbindFramebuffer()

Unbind the currently bound framebuffer.