Пример #1
0
func GetUniformfv(
	program uint32, location int32, params *float32) {
	C.glGetUniformfv(
		C.GLuint(program),
		C.GLint(location),
		(*C.GLfloat)(params))
}
Пример #2
0
func GetUniformfv(dst []float32, src Uniform, p Program) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.GetUniformfv(len(%d), %v, %v) %v", len(dst), src, p, errstr)
	}()
	C.glGetUniformfv(p.c(), src.c(), (*C.GLfloat)(&dst[0]))
}
Пример #3
0
func (program Program) GetUniformfv(location UniformLocation, values []float32) {
	if len(values) == 0 {
		panic("Invalid values length")
	}
	// FIXME(jimt): This should really yield only one return value instead of using a slice.
	// http://www.opengl.org/sdk/docs/man/xhtml/glGetUniform.xml
	C.glGetUniformfv(C.GLuint(program), C.GLint(location), (*C.GLfloat)(&(values[0])))
}
Пример #4
0
func GetUniformfv(dst []float32, src Uniform, p Program) {
	C.glGetUniformfv(p.c(), src.c(), (*C.GLfloat)(&dst[0]))
}
Пример #5
0
func GetUniformfv(program uint, location int, params []float32) []float32 {
	C.glGetUniformfv(C.GLuint(program), C.GLint(location), (*C.GLfloat)(&params[0]))
	return params
}