Ejemplo n.º 1
0
func Uniform2fv(dst Uniform, src []float32) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.Uniform2fv(%v, len(%d)) %v", dst, len(src), errstr)
	}()
	C.glUniform2fv(dst.c(), C.GLsizei(len(src)/2), (*C.GLfloat)(&src[0]))
}
Ejemplo n.º 2
0
func Uniform2fv(
	location int32, count Sizei, v *float32) {
	C.glUniform2fv(
		C.GLint(location),
		C.GLsizei(count),
		(*C.GLfloat)(v))
}
Ejemplo n.º 3
0
func Uniform2fv(dst Uniform, src []float32) {
	C.glUniform2fv(dst.c(), C.GLsizei(len(src)/2), (*C.GLfloat)(&src[0]))
}
Ejemplo n.º 4
0
func (location UniformLocation) Uniform2fv(count int, v []float32) {
	if len(v) < 1 {
		panic("Invalid array length - must be at least 1")
	}
	C.glUniform2fv(C.GLint(location), C.GLsizei(count), (*C.GLfloat)(&v[0]))
}
Ejemplo n.º 5
0
func Uniform2fv(location, count int, value []float32) {
	C.glUniform2fv(C.GLint(location), C.GLsizei(count), (*C.GLfloat)(&value[0]))
}
Ejemplo n.º 6
0
func (u Uniform2f) Setv(data []float32) {
	C.glUniform2fv(u.location, C.GLsizei(len(data)/2), (*C.GLfloat)(&data[0]))
}
Ejemplo n.º 7
0
func (location UniformLocation) Uniform2fv(count int, v []float32) {
	if len(v) < 1 {
		panic(ErrorInputSize)
	}
	C.glUniform2fv(C.GLint(location), C.GLsizei(count), (*C.GLfloat)(&v[0]))
}
Ejemplo n.º 8
0
func (location UniformLocation) Uniform2fv(v []float32) {
	if len(v) > 0 {
		C.glUniform2fv(C.GLint(location), C.GLsizei(len(v)), (*C.GLfloat)(&v[0]))
	}
}