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