Exemplo n.º 1
0
func (me *Program) UniformVec3(name string, vec *GlVec3) {
	if loc, ok := me.UnifLocs[name]; ok && me.unif.cacheVec3[loc] != *vec {
		me.unif.cacheVec3[loc] = *vec
		gl.Uniform3fv(loc, 1, &vec[0])
	}
}
Exemplo n.º 2
0
//	Convenience short-hand for gl.Uniform3fv, if this Program contains the specified uniform.
func (me *Program) Uniform3fv(name string, count gl.Sizei, value *gl.Float) {
	if loc, ok := me.UnifLocs[name]; ok {
		gl.Uniform3fv(loc, count, value)
	}
}