from stdapi import *
-GLboolean = Alias("GLboolean", Bool)
+GLboolean = Enum("GLboolean", [
+ "GL_TRUE",
+ "GL_FALSE",
+])
+
GLvoid = Alias("GLvoid", Void)
GLbyte = Alias("GLbyte", SChar)
GLshort = Alias("GLshort", Short)
GLclampf = Alias("GLclampf", Float)
GLdouble = Alias("GLdouble", Double)
GLclampd = Alias("GLclampd", Double)
-GLchar = Alias("GLchar", SChar)
-GLstring = String("GLchar *")
+GLchar = Alias("GLchar", Char)
GLcharARB = Alias("GLcharARB", SChar)
-GLstringARB = String("GLcharARB *")
GLintptrARB = Alias("GLintptrARB", Int)
GLsizeiptrARB = Alias("GLsizeiptrARB", Int)
GLhandleARB = Handle("handleARB", Alias("GLhandleARB", UInt))
GLhalfNV = Alias("GLhalfNV", UShort)
GLint64EXT = Alias("GLint64EXT", Int64)
GLuint64EXT = Alias("GLuint64EXT", UInt64)
+GLDEBUGPROC = Opaque("GLDEBUGPROC")
GLDEBUGPROCARB = Opaque("GLDEBUGPROCARB")
GLDEBUGPROCAMD = Opaque("GLDEBUGPROCAMD")
+GLstring = String(GLchar)
+GLstringConst = String(Const(GLchar))
+GLstringARB = String(GLcharARB)
+GLstringConstARB = String(Const(GLcharARB))
+
GLpointer = OpaquePointer(GLvoid)
GLpointerConst = OpaquePointer(Const(GLvoid))
# reconstructed from other state.
GLmap = LinearPointer(GLvoid, "length")
-GLsync_ = IntPointer("GLsync")
-GLsync = Handle("sync", GLsync_)
+GLsync = Handle("sync", IntPointer("GLsync"))
GLenum = Enum("GLenum", [
# Parameters are added later from glparams.py's parameter table
])
# Some functions take GLenum disguised as GLint, and need special treatment so
-# that symbolic names are traced correctly. Apple noticed and fixed it in the
-# gl.h header, which further complicates things. C++ typechecking rules force
-# the wrappers to match the prototype precisely, so the precise type is defined
-# in glimports.hpp
-GLenum_int = Alias("GLenum_int", GLenum)
+# that symbolic names are traced correctly.
+GLenum_int = Alias("GLint", GLenum)
GLenum_mode = FakeEnum(GLenum, [
"GL_POINTS", # 0x0000
"GL_GEOMETRY_SHADER_BIT", # 0x00000004
"GL_TESS_CONTROL_SHADER_BIT", # 0x00000008
"GL_TESS_EVALUATION_SHADER_BIT", # 0x00000010
+ "GL_COMPUTE_SHADER_BIT", # 0x00000020
])
GLbitfield_access = Flags(GLbitfield, [