Skip to content

Instantly share code, notes, and snippets.

@manveru
Created May 26, 2010 10:23
Show Gist options
  • Save manveru/d7fb620403c46eb55ab5 to your computer and use it in GitHub Desktop.
Save manveru/d7fb620403c46eb55ab5 to your computer and use it in GitHub Desktop.
diff --git a/gl10/gl.go b/gl10/gl.go
index 6f33f6a..42c6cf6 100644
--- a/gl10/gl.go
+++ b/gl10/gl.go
@@ -1,8 +1,10 @@
package gl
// #ifdef __Darwin
+// # include <OpenGL/glew.h>
// # include <OpenGL/gl.h>
// #else
+// # include <GL/glew.h>
// # include <GL/gl.h>
// #endif
//
@@ -541,6 +543,11 @@ func GetError() GLenum {
return GLenum(C.glGetError())
}
+func GetErrorString(error GLenum) string {
+ raw := (*C.char)(unsafe.Pointer(C.glewGetErrorString(C.GLenum(error))))
+ return C.GoString(raw)
+}
+
//void glGetFloatv (GLenum pname, GLfloat *params)
func GetFloatv(pname GLenum, params *GLfloat) {
C.glGetFloatv(C.GLenum(pname), (*C.GLfloat)(params))
@@ -1716,8 +1723,8 @@ type GLintptrARB C.GLintptrARB
type GLsizeiptrARB C.GLsizeiptrARB
type GLcharARB C.GLcharARB
type GLhandleARB C.GLhandleARB
-type GLhalfARB C.GLhalfARB
-type GLhalfNV C.GLhalfNV
+// type GLhalfARB C.GLhalfARB
+// type GLhalfNV C.GLhalfNV
type GLint64EXT C.GLint64EXT
type GLuint64EXT C.GLuint64EXT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment