Exemplo n.º 1
0
func GetString(name Enum) (r0 string) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.GetString(%v) %v%v", name, r0, errstr)
	}()
	return C.GoString((*C.char)((unsafe.Pointer)(C.glGetString(name.c()))))
}
Exemplo n.º 2
0
func GetString(pname Enum) string {
	// Bounce through unsafe.Pointer, because on some platforms
	// GetString returns an *unsigned char which doesn't convert.
	return C.GoString((*C.char)((unsafe.Pointer)(C.glGetString(pname.c()))))
}
Exemplo n.º 3
0
func GetString(name C.GLenum) string {
	val := C.glGetString(C.GLenum(name))
	return C.GoString((*C.char)(unsafe.Pointer(val)))
}
Exemplo n.º 4
0
func GetString(name InfoType) string {
	return C.GoString((*C.char)(unsafe.Pointer(C.glGetString(C.GLenum(name)))))
}
Exemplo n.º 5
0
Arquivo: gl.go Projeto: james4k/gl
//const uint8 * glGetString (GLenum name)
func GetString(name GLenum) string {
	s := unsafe.Pointer(C.glGetString(C.GLenum(name)))
	return C.GoString((*C.char)(s))
}
Exemplo n.º 6
0
func GetString(name uint) string {
	s := (*C.GLchar)(unsafe.Pointer(C.glGetString(C.GLenum(name))))
	defer C.free(unsafe.Pointer(s))
	return GoString(s)

}
Exemplo n.º 7
0
func GetString(name Enum) string {
	return *goString((*C.GLchar)(unsafe.Pointer((C.glGetString(C.GLenum(name))))))
}