Esempio n. 1
0
func (location UniformLocation) UniformMatrix3x4fv(transpose bool, list ...[]float32) {
	if len(list) < 1 {
		panic(ErrorInputSize)
	}
	// Maybe this isn't the best solution because of added overhead.
	for i, _ := range list {
		if len(list[i]) != 12 {
			panic(ErrorInputSize)
		}
	}
	C.glUniformMatrix3x4fv(C.GLint(location), C.GLsizei(len(list)), glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&list[0]))))
}
Esempio n. 2
0
func (location UniformLocation) UniformMatrix3x4f(transpose bool, matrix *[12]float32) {
	if matrix == nil {
		panic("Matrix is nil")
	}
	C.glUniformMatrix3x4fv(C.GLint(location), 1, glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&matrix[0]))))
}
Esempio n. 3
0
func (location UniformLocation) UniformMatrix3x4fv(transpose bool, list ...[12]float32) {
	if len(list) < 1 {
		panic("Invalid array length - must be at least 1")
	}
	C.glUniformMatrix3x4fv(C.GLint(location), C.GLsizei(len(list)), glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&list[0]))))
}
Esempio n. 4
0
func (location UniformLocation) UniformMatrix3x4f(transpose bool, matrix []float32) {
	if len(matrix) != 12 {
		panic(ErrorInputSize)
	}
	C.glUniformMatrix3x4fv(C.GLint(location), 1, glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&matrix[0]))))
}