示例#1
0
文件: gldebug.go 项目: Miaque/mojo
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()))))
}
示例#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()))))
}
示例#3
0
func GetString(name C.GLenum) string {
	val := C.glGetString(C.GLenum(name))
	return C.GoString((*C.char)(unsafe.Pointer(val)))
}
示例#4
0
文件: gl.go 项目: jackscan/go-gles2
func GetString(name InfoType) string {
	return C.GoString((*C.char)(unsafe.Pointer(C.glGetString(C.GLenum(name)))))
}
示例#5
0
文件: gl.go 项目: 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))
}
示例#6
0
文件: es2.go 项目: nick-fedesna/egles
func GetString(name uint) string {
	s := (*C.GLchar)(unsafe.Pointer(C.glGetString(C.GLenum(name))))
	defer C.free(unsafe.Pointer(s))
	return GoString(s)

}
示例#7
0
func GetString(name Enum) string {
	return *goString((*C.GLchar)(unsafe.Pointer((C.glGetString(C.GLenum(name))))))
}