openrndr / org.openrndr.draw / RenderTarget

RenderTarget

interface RenderTarget (source)

Properties

colorAttachments

list of ColorAttachments

abstract val colorAttachments: List<ColorAttachment>

contentScale

content scaling factor

abstract val contentScale: Double

depthBuffer

depthBuffer

abstract val depthBuffer: DepthBuffer?

effectiveHeight

effective height in pixels

open val effectiveHeight: Int

effectiveWidth

effective width in pixels

open val effectiveWidth: Int

hasColorAttachments

indicates that this RenderTarget has at least one ColorAttachment

abstract val hasColorAttachments: Boolean

hasDepthBuffer

indicates that this RenderTarget has a DepthBuffer

abstract val hasDepthBuffer: Boolean

height

height in display units

abstract val height: Int

multisample

multisample mode

abstract val multisample: BufferMultisample

session

Session in which this render target is created

abstract val session: Session?

width

width in display units

abstract val width: Int

Functions

attach

abstract fun attach(colorBuffer: ColorBuffer, level: Int = 0, name: String? = null): Unit
abstract fun attach(depthBuffer: DepthBuffer): Unit
abstract fun attach(arrayTexture: ArrayTexture, layer: Int, level: Int = 0, name: String? = null): Unit
abstract fun attach(arrayCubemap: ArrayCubemap, side: CubemapSide, layer: Int, level: Int = 0, name: String? = null): Unit
abstract fun attach(cubemap: Cubemap, side: CubemapSide, level: Int = 0, name: String? = null): Unit
abstract fun attach(volumeTexture: VolumeTexture, layer: Int, level: Int = 0, name: String? = null): Unit

attachLayered

abstract fun attachLayered(arrayTexture: ArrayTexture, level: Int = 0, name: String? = null): Unit
abstract fun attachLayered(arrayCubemap: ArrayCubemap, level: Int = 0, name: String? = null): Unit
abstract fun attachLayered(cubemap: Cubemap, level: Int = 0, name: String? = null): Unit
abstract fun attachLayered(volumeTexture: VolumeTexture, level: Int = 0, name: String? = null): Unit

bind

binds the RenderTarget to the active target

abstract fun bind(): Unit

blendMode

set the BlendMode for a ColorAttachment

abstract fun blendMode(index: Int, blendMode: BlendMode): Unit

clearColor

clear a color attachment

abstract fun clearColor(index: Int, color: ColorRGBa): Unit

clearDepth

clear the depth attachment

abstract fun clearDepth(depth: Double = 1.0, stencil: Int = 0): Unit

colorAttachmentByName

find color attachment by name

open fun colorAttachmentByName(name: String): ColorAttachment?

colorAttachmentIndexByName

find color attachment index by name

open fun colorAttachmentIndexByName(name: String): Int?

colorBuffer

get a color attachment as a ColorBuffer

abstract fun colorBuffer(index: Int): ColorBuffer

destroy

destroy the RenderTarget to properly destroy destroy color attachments and depth attachment first then use detachColorAttachments and detachDepthBuffer before calling destroy

abstract fun destroy(): Unit

detachColorAttachments

detach all color attachments

abstract fun detachColorAttachments(): Unit

detachDepthBuffer

detach depth buffer

abstract fun detachDepthBuffer(): Unit

resolveTo

open fun resolveTo(to: RenderTarget): Unit

unbind

unbinds the RenderTarget from the active target

abstract fun unbind(): Unit

Companion Object Properties

active

val active: RenderTarget

Inheritors

ProgramRenderTarget

A render target that wraps around the back-buffer

interface ProgramRenderTarget : RenderTarget