Package org.polyfrost.polyui.renderer
Interface FramebufferController
-
- All Implemented Interfaces:
public interface FramebufferControllerImplement 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
-
-
Method Summary
Modifier and Type Method Description abstract FramebuffercreateFramebuffer(Float width, Float height)Create a new framebuffer. abstract UnitbindFramebuffer(Framebuffer fbo)Bind the given framebuffer. abstract UnitunbindFramebuffer()Unbind the currently bound framebuffer. abstract UnitdrawFramebuffer(Framebuffer fbo, Float x, Float y, Float width, Float height)draw the given framebuffer to the screen. abstract Unitdelete(Framebuffer fbo)Delete the given framebuffer. -
-
Method Detail
-
createFramebuffer
abstract Framebuffer createFramebuffer(Float width, Float height)
Create a new framebuffer. It is down to you (as a rendering implementation) to cache this, and dispose of it as necessary.
- Returns:
a PolyUI framebuffer object using the width and height passed to this method. This is used by PolyUI to identify it.
-
bindFramebuffer
abstract Unit bindFramebuffer(Framebuffer fbo)
Bind the given framebuffer.
-
unbindFramebuffer
abstract Unit unbindFramebuffer()
Unbind the currently bound framebuffer.
-
drawFramebuffer
abstract Unit drawFramebuffer(Framebuffer fbo, Float x, Float y, Float width, Float height)
draw the given framebuffer to the screen.
-
delete
abstract Unit delete(Framebuffer fbo)
Delete the given framebuffer. Ignore if null.
-
-
-
-