Example #1
0
func (location UniformLocation) UniformMatrix3x2fv(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]) != 6 {
			panic(ErrorInputSize)
		}
	}
	C.glUniformMatrix3x2fv(C.GLint(location), C.GLsizei(len(list)), glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&list[0]))))
}
Example #2
0
func (location UniformLocation) UniformMatrix3x2f(transpose bool, matrix *[6]float32) {
	if matrix == nil {
		panic("Matrix is nil")
	}
	C.glUniformMatrix3x2fv(C.GLint(location), 1, glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&matrix[0]))))
}
Example #3
0
func (location UniformLocation) UniformMatrix3x2fv(transpose bool, list ...[6]float32) {
	if len(list) < 1 {
		panic("Invalid array length - must be at least 1")
	}
	C.glUniformMatrix3x2fv(C.GLint(location), C.GLsizei(len(list)), glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&list[0]))))
}
Example #4
0
func (location UniformLocation) UniformMatrix3x2f(transpose bool, matrix []float32) {
	if len(matrix) != 6 {
		panic(ErrorInputSize)
	}
	C.glUniformMatrix3x2fv(C.GLint(location), 1, glBool(transpose), ((*C.GLfloat)((unsafe.Pointer)(&matrix[0]))))
}