Beispiel #1
0
func GetBooleanv(dst []bool, pname Enum) {
	buf := make([]C.GLboolean, len(dst))
	C.glGetBooleanv(pname.c(), &buf[0])
	for i, v := range buf {
		dst[i] = v != 0
	}
}
Beispiel #2
0
func GetBooleanv(
	pname Enum, params *bool) {
	p := glBoolean(*params)
	C.glGetBooleanv(
		C.GLenum(pname),
		&p)
	params = goBoolean(p)

}
Beispiel #3
0
Datei: gl.go Projekt: micia/gl
// Convenience function for GetBooleanv
func GetBoolean4(pname GLenum) (v0, v1, v2, v3 bool) {
	var values [4]C.GLboolean
	C.glGetBooleanv(C.GLenum(pname), &values[0])
	v0 = values[0] != 0
	v1 = values[1] != 0
	v2 = values[2] != 0
	v3 = values[3] != 0
	return
}
Beispiel #4
0
func GetBooleanv(dst []bool, pname Enum) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.GetBooleanv(%v, %v) %v", dst, pname, errstr)
	}()
	buf := make([]C.GLboolean, len(dst))
	C.glGetBooleanv(pname.c(), &buf[0])
	for i, v := range buf {
		dst[i] = v != 0
	}
}
Beispiel #5
0
Datei: gl.go Projekt: james4k/gl
//void glGetBooleanv (GLenum pname, bool *params)
func GetBooleanv(pname GLenum, params []bool) {
	if len(params) == 0 {
		panic("Invalid params length")
	}
	C.glGetBooleanv(C.GLenum(pname), (*C.GLboolean)(unsafe.Pointer(&params[0])))
}
Beispiel #6
0
func GetBooleanv(pname uint, params []bool) []bool {
	C.glGetBooleanv(C.GLenum(pname), (*C.GLboolean)(unsafe.Pointer(&params[0])))
	return params
}
Beispiel #7
0
Datei: gl.go Projekt: Nvveen/gl
//void glGetBooleanv (GLenum pname, bool *params)
func GetBooleanv(pname GLenum, params []bool) {
	if len(params) == 0 {
		panic(ErrorInputSize)
	}
	C.glGetBooleanv(C.GLenum(pname), (*C.GLboolean)(unsafe.Pointer(&params[0])))
}