FrameBuffer

class FrameBuffer(val width: Int, val height: Int, val hasDepth: Boolean = false, val hasStencil: Boolean = false, var hasPackedDepthStencil: Boolean = false, val format: Pixmap.Format = Pixmap.Format.RGBA8888, val minFilter: TexMinFilter = TexMinFilter.LINEAR, val magFilter: TexMagFilter = TexMagFilter.LINEAR) : Preparable, Disposable

Encapsulates OpenGL frame buffer objects.

Author

Colton Daily

Parameters

width

the width of the framebuffer in pixels

height

the height of the framebuffer in pixels

hasDepth

whether to attach a depth buffer. Defaults to false.

hasStencil

whether to attach a stencil buffer. Defaults to false.

format

the format of the color buffer

Constructors

Link copied to clipboard
fun FrameBuffer(width: Int, height: Int, hasDepth: Boolean = false, hasStencil: Boolean = false, hasPackedDepthStencil: Boolean = false, format: Pixmap.Format = Pixmap.Format.RGBA8888, minFilter: TexMinFilter = TexMinFilter.LINEAR, magFilter: TexMagFilter = TexMagFilter.LINEAR)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun begin()
Link copied to clipboard
open override fun dispose()
Link copied to clipboard
fun end()
Link copied to clipboard
open override fun prepare(context: Context)

Prepares/builds this object to be used by GL. Do any generating, uploading, etc of data here Only needs to be called ONCE per object!!

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val hasDepth: Boolean = false
Link copied to clipboard
Link copied to clipboard
val hasStencil: Boolean = false
Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val prepared: Boolean
Link copied to clipboard
var texture: Texture? = null
Link copied to clipboard
val width: Int