colorBuffer

fun colorBuffer(width: Int, height: Int, contentScale: Double = 1.0, format: ColorFormat = ColorFormat.RGBa, type: ColorType = defaultColorType(format), multisample: BufferMultisample = BufferMultisample.Disabled, levels: Int = 1, session: Session? = Session.active): ColorBuffer(source)

Creates a new color buffer with the specified dimensions and configuration.

Return

A new instance of a color buffer with the specified properties.

Parameters

width

The width of the color buffer in pixels.

height

The height of the color buffer in pixels.

contentScale

The content scaling factor, default is 1.0.

format

The color format of the buffer, default is RGBa.

type

The color type of the buffer, default depends on the passed color format.

multisample

Multisample setting for the buffer, default is no multisampling.

levels

The number of mipmap levels in the buffer, default is 1.

session

The session information associated with the buffer, defaults to the active session.

See also