Пример #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()))))
}
Пример #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
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
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))))))
}