Uniforms

clay.graphics.Uniforms (Class)

Instance Members

gpuShader: clay.GpuShader

setInt(name: String, value: Int): Void
Name Type
name String
value Int

setIntArray(name: String, value: clay.buffers.Int32Array): Void
Name Type
name String
value clay.buffers.Int32Array

setFloat(name: String, value: Float): Void
Name Type
name String
value Float

setFloatArray(name: String, value: clay.buffers.Float32Array): Void
Name Type
name String
value clay.buffers.Float32Array

setVector2(name: String, x: Float, y: Float): Void
Name Type
name String
x Float
y Float

setVector3(name: String, x: Float, y: Float, z: Float): Void
Name Type
name String
x Float
y Float
z Float

setVector4(name: String, x: Float, y: Float, z: Float, w: Float): Void
Name Type
name String
x Float
y Float
z Float
w Float

setMatrix4(name: String, value: clay.buffers.Float32Array): Void
Name Type
name String
value clay.buffers.Float32Array

setColor(name: String, r: Float, g: Float, b: Float, a: Float): Void
Name Type
name String
r Float
g Float
b Float
a Float

setTexture(name: String, slot: Int, texture: Texture): Void
Name Type
name String
slot Int
texture Texture

apply(): Void

clone(): Uniforms
Returns
Uniforms

new(gpuShader: clay.GpuShader): Void
Name Type
gpuShader clay.GpuShader

Private Members


intArrays: clay.IntMap

floats: clay.IntMap

floatArrays: clay.IntMap

vector2s: clay.IntMap

vector3s: clay.IntMap

vector4s: clay.IntMap

matrix4s: clay.IntMap

colors: clay.IntMap

textures: clay.IntMap

dirtyInts: Array<Int>

dirtyIntArrays: Array<Int>

dirtyFloats: Array<Int>

dirtyFloatArrays: Array<Int>

dirtyVector2s: Array<Int>

dirtyVector3s: Array<Int>

dirtyVector4s: Array<Int>

dirtyMatrix4s: Array<Int>

dirtyColors: Array<Int>

dirtyTextures: Array<Int>