openrndr / org.openrndr.draw / Shader

Shader

interface Shader (source)

Properties

session

abstract val session: Session?

types

abstract val types: Set<ShaderType>

Functions

begin

abstract fun begin(): Unit

block

abstract fun block(blockName: String, block: UniformBlock): Unit

blockLayout

abstract fun blockLayout(blockName: String): UniformBlockLayout?

createBlock

abstract fun createBlock(blockName: String): UniformBlock

destroy

abstract fun destroy(): Unit

end

abstract fun end(): Unit

hasUniform

abstract fun hasUniform(name: String): Boolean

uniform

abstract fun uniform(name: String, value: Matrix33): Unit
abstract fun uniform(name: String, value: Matrix44): Unit
abstract fun uniform(name: String, value: ColorRGBa): Unit
abstract fun uniform(name: String, value: Vector4): Unit
abstract fun uniform(name: String, value: Vector3): Unit
abstract fun uniform(name: String, value: Vector2): Unit
abstract fun uniform(name: String, value: IntVector4): Unit
abstract fun uniform(name: String, value: IntVector3): Unit
abstract fun uniform(name: String, value: IntVector2): Unit
abstract fun uniform(name: String, x: Float, y: Float, z: Float, w: Float): Unit
abstract fun uniform(name: String, x: Float, y: Float, z: Float): Unit
abstract fun uniform(name: String, x: Float, y: Float): Unit
abstract fun uniform(name: String, value: Double): Unit
abstract fun uniform(name: String, value: Float): Unit
abstract fun uniform(name: String, value: Int): Unit
abstract fun uniform(name: String, value: Boolean): Unit
abstract fun uniform(name: String, value: Array<Matrix44>): Unit
abstract fun uniform(name: String, value: Array<Vector4>): Unit
abstract fun uniform(name: String, value: Array<Vector3>): Unit
abstract fun uniform(name: String, value: Array<Vector2>): Unit
abstract fun uniform(name: String, value: Array<IntVector4>): Unit
abstract fun uniform(name: String, value: Array<IntVector3>): Unit
abstract fun uniform(name: String, value: Array<IntVector2>): Unit
abstract fun uniform(name: String, value: FloatArray): Unit
abstract fun uniform(name: String, value: IntArray): Unit

Companion Object Functions

createFromCode

fun createFromCode(vsCode: String, fsCode: String, name: String, session: Session? = Session.active): Shader
fun createFromCode(vsCode: String, gsCode: String, fsCode: String, name: String, session: Session? = Session.active): Shader

createFromUrls

fun createFromUrls(vsUrl: String, gsUrl: String, fsUrl: String, session: Session? = Session.active): Shader
fun createFromUrls(vsUrl: String, fsUrl: String, session: Session? = Session.active): Shader