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