openrndr / org.openrndr.draw / BufferTexture

BufferTexture

interface BufferTexture (source)

Properties

elementCount

abstract val elementCount: Int

format

abstract val format: ColorFormat

session

abstract val session: Session?

shadow

abstract val shadow: BufferTextureShadow

type

abstract val type: ColorType

Functions

bind

bind the BufferTexture to a texture unit

abstract fun bind(unit: Int): Unit

destroy

abstract fun destroy(): Unit

put

open fun put(putter: BufferWriter.() -> Unit): Int

read

abstract fun read(target: ByteBuffer, offset: Int = 0, elementReadCount: Int = this.elementCount): Unit

saveToFile

open fun saveToFile(file: File, fileFormat: BufferTextureFileFormat = BufferTextureFileFormat.ORB): Unit

write

abstract fun write(source: ByteBuffer, offset: Int = 0, elementWriteCount: Int = this.elementCount): Unit

Companion Object Functions

create

fun create(elementCount: Int, format: ColorFormat = ColorFormat.RGBa, type: ColorType = ColorType.FLOAT32, session: Session? = Session.active): BufferTexture

Extension Functions

imageBinding

fun BufferTexture.imageBinding(imageAccess: ImageAccess): BufferTextureImageBinding