예제 #1
0
//	Convenience short-hand for gl.UniformMatrix4fv, if this Program contains the specified uniform.
func (me *Program) UniformMatrix4fv(name string, count gl.Sizei, transpose gl.Boolean, value *gl.Float) {
	if loc, ok := me.UnifLocs[name]; ok {
		gl.UniformMatrix4fv(loc, count, transpose, value)
	}
}
예제 #2
0
func (me *Program) UniformMat4(name string, mat4 *GlMat4) {
	if loc, ok := me.UnifLocs[name]; ok && me.unif.cacheMat4[loc] != *mat4 {
		me.unif.cacheMat4[loc] = *mat4
		gl.UniformMatrix4fv(loc, 1, gl.FALSE, &mat4[0])
	}
}