UniformValueCache

The values last set at the uniform locations of a shader, so that values that are set again are not uploaded. Numbers and booleans are kept in primitive arrays, they are not boxed. Values of immutable types are kept as objects and compared with equals.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun changed(index: Int, value: Any): Boolean
fun changed(index: Int, value: Boolean): Boolean
fun changed(index: Int, value: Float): Boolean
fun changed(index: Int, value: Int): Boolean

fun changed(index: Int, value: Double): Boolean

is value different from the value last set at index? It is recorded when it is.

Link copied to clipboard
fun clear(index: Int)

forgets the value at index, the next value set there is uploaded