openrndr / org.openrndr.internal.gl3 / ColorBufferGL3

ColorBufferGL3

class ColorBufferGL3 : ColorBuffer

Constructors

<init>

ColorBufferGL3(target: Int, texture: Int, width: Int, height: Int, contentScale: Double, format: ColorFormat, type: ColorType, multisample: BufferMultisample)

Properties

contentScale

val contentScale: Double

the content scale of the ColorBuffer

filterMag

var filterMag: MagnifyingFilter

the filter to use when display at sizes larger than the original

filterMin

var filterMin: MinifyingFilter

the filter to use when displaying at sizes smaller than the original

flipV

var flipV: Boolean

should the v coordinate be flipped because the ColorBuffer contents are stored upside-down?

format

val format: ColorFormat

height

val height: Int

the height of the ColorBuffer in device units

multisample

val multisample: BufferMultisample

the multisampling method used for this ColorBuffer

realShadow

var realShadow: ColorBufferShadow?

shadow

val shadow: ColorBufferShadow

target

val target: Int

texture

val texture: Int

type

val type: ColorType

width

val width: Int

the width of the ColorBuffer in device units

wrapU

var wrapU: WrapMode

the wrapping mode to use in the horizontal direction

wrapV

var wrapV: WrapMode

the wrapping mode to use in the vertical direction

Inherited Properties

bounds

open val bounds: Rectangle

effectiveHeight

open val effectiveHeight: Int

the height of the ColorBuffer in pixels

effectiveWidth

open val effectiveWidth: Int

the width of the ColorBuffer in pixels

Functions

bind

fun bind(unit: Int): Unit

binds the colorbuffer to a texture unit, internal API

bound

fun bound(f: ColorBufferGL3.() -> Unit): Unit

destroy

fun destroy(): Unit

destroys the underlying ColorBuffer resources

destroyShadow

fun destroyShadow(): Unit

generateMipmaps

fun generateMipmaps(): Unit

generates mipmaps from the top-level mipmap

read

fun read(buffer: ByteBuffer): Unit

resolveTo

fun resolveTo(target: ColorBuffer): Unit

resolves (or copies) to a non-multisampled color buffer

saveToFile

fun saveToFile(file: File, fileFormat: FileFormat): Unit

save the ColorBuffer to File

write

fun write(buffer: ByteBuffer): Unit

Inherited Functions

filter

open fun filter(filterMin: MinifyingFilter, filterMag: MagnifyingFilter): Unit

sets the ColorBuffer filter for minifying and magnification

Companion Object Functions

create

fun create(width: Int, height: Int, contentScale: Double = 1.0, format: ColorFormat = ColorFormat.RGBa, type: ColorType = ColorType.FLOAT32, multisample: BufferMultisample): ColorBufferGL3

fromFile

fun fromFile(filename: String): ColorBuffer

fromUrl

fun fromUrl(url: String): ColorBuffer