]> git.cworth.org Git - apitrace/blobdiff - opengl32.py
Distinguish and ignore functions without side effects.
[apitrace] / opengl32.py
index 7b5e2339867bef9b02dc4d8a41073fd7ee243a26..d3fd67052bb7cdd8adc45568a216ea8c1a069937 100644 (file)
@@ -27,419 +27,10 @@ from gl import *
 from windows import *
 
 opengl32 = Dll("opengl32")
-opengl32.functions += [
-    DllFunction(Void, "glNewList", [(GLuint, "list"), (GLenum, "mode")]),
-    DllFunction(Void, "glEndList", []),
-    DllFunction(Void, "glCallList", [(GLuint, "list")]),
-    DllFunction(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Pointer(Const(GLvoid)), "lists")]),
-    DllFunction(Void, "glDeleteLists", [(GLuint, "list"), (GLsizei, "range")]),
-    DllFunction(GLuint, "glGenLists", [(GLsizei, "range")]),
-    DllFunction(Void, "glListBase", [(GLuint, "base")]),
-    DllFunction(Void, "glBegin", [(GLprimenum, "mode")]),
-    DllFunction(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Pointer(Const(GLubyte)), "bitmap")]),
-    DllFunction(Void, "glColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
-    DllFunction(Void, "glColor3bv", [(Pointer(Const(GLbyte)), "v")]),
-    DllFunction(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
-    DllFunction(Void, "glColor3dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
-    DllFunction(Void, "glColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
-    DllFunction(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
-    DllFunction(Void, "glColor3iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
-    DllFunction(Void, "glColor3sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
-    DllFunction(Void, "glColor3ubv", [(Pointer(Const(GLubyte)), "v")]),
-    DllFunction(Void, "glColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
-    DllFunction(Void, "glColor3uiv", [(Pointer(Const(GLuint)), "v")]),
-    DllFunction(Void, "glColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
-    DllFunction(Void, "glColor3usv", [(Pointer(Const(GLushort)), "v")]),
-    DllFunction(Void, "glColor4b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue"), (GLbyte, "alpha")]),
-    DllFunction(Void, "glColor4bv", [(Pointer(Const(GLbyte)), "v")]),
-    DllFunction(Void, "glColor4d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue"), (GLdouble, "alpha")]),
-    DllFunction(Void, "glColor4dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glColor4f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
-    DllFunction(Void, "glColor4fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glColor4i", [(GLint, "red"), (GLint, "green"), (GLint, "blue"), (GLint, "alpha")]),
-    DllFunction(Void, "glColor4iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glColor4s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue"), (GLshort, "alpha")]),
-    DllFunction(Void, "glColor4sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glColor4ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue"), (GLubyte, "alpha")]),
-    DllFunction(Void, "glColor4ubv", [(Pointer(Const(GLubyte)), "v")]),
-    DllFunction(Void, "glColor4ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue"), (GLuint, "alpha")]),
-    DllFunction(Void, "glColor4uiv", [(Pointer(Const(GLuint)), "v")]),
-    DllFunction(Void, "glColor4us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue"), (GLushort, "alpha")]),
-    DllFunction(Void, "glColor4usv", [(Pointer(Const(GLushort)), "v")]),
-    DllFunction(Void, "glEdgeFlag", [(GLboolean, "flag")]),
-    DllFunction(Void, "glEdgeFlagv", [(Pointer(Const(GLboolean)), "flag")]),
-    DllFunction(Void, "glEnd", []),
-    DllFunction(Void, "glIndexd", [(GLdouble, "c")]),
-    DllFunction(Void, "glIndexdv", [(Pointer(Const(GLdouble)), "c")]),
-    DllFunction(Void, "glIndexf", [(GLfloat, "c")]),
-    DllFunction(Void, "glIndexfv", [(Pointer(Const(GLfloat)), "c")]),
-    DllFunction(Void, "glIndexi", [(GLint, "c")]),
-    DllFunction(Void, "glIndexiv", [(Pointer(Const(GLint)), "c")]),
-    DllFunction(Void, "glIndexs", [(GLshort, "c")]),
-    DllFunction(Void, "glIndexsv", [(Pointer(Const(GLshort)), "c")]),
-    DllFunction(Void, "glNormal3b", [(GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]),
-    DllFunction(Void, "glNormal3bv", [(Pointer(Const(GLbyte)), "v")]),
-    DllFunction(Void, "glNormal3d", [(GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]),
-    DllFunction(Void, "glNormal3dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glNormal3f", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]),
-    DllFunction(Void, "glNormal3fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glNormal3i", [(GLint, "nx"), (GLint, "ny"), (GLint, "nz")]),
-    DllFunction(Void, "glNormal3iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glNormal3s", [(GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]),
-    DllFunction(Void, "glNormal3sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glRasterPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
-    DllFunction(Void, "glRasterPos2dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glRasterPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
-    DllFunction(Void, "glRasterPos2fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glRasterPos2i", [(GLint, "x"), (GLint, "y")]),
-    DllFunction(Void, "glRasterPos2iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glRasterPos2s", [(GLshort, "x"), (GLshort, "y")]),
-    DllFunction(Void, "glRasterPos2sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glRasterPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    DllFunction(Void, "glRasterPos3dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glRasterPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    DllFunction(Void, "glRasterPos3fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glRasterPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    DllFunction(Void, "glRasterPos3iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glRasterPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    DllFunction(Void, "glRasterPos3sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glRasterPos4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    DllFunction(Void, "glRasterPos4dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glRasterPos4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    DllFunction(Void, "glRasterPos4fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glRasterPos4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    DllFunction(Void, "glRasterPos4iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glRasterPos4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    DllFunction(Void, "glRasterPos4sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glRectd", [(GLdouble, "x1"), (GLdouble, "y1"), (GLdouble, "x2"), (GLdouble, "y2")]),
-    DllFunction(Void, "glRectdv", [(Pointer(Const(GLdouble)), "v1"), (Pointer(Const(GLdouble)), "v2")]),
-    DllFunction(Void, "glRectf", [(GLfloat, "x1"), (GLfloat, "y1"), (GLfloat, "x2"), (GLfloat, "y2")]),
-    DllFunction(Void, "glRectfv", [(Pointer(Const(GLfloat)), "v1"), (Pointer(Const(GLfloat)), "v2")]),
-    DllFunction(Void, "glRecti", [(GLint, "x1"), (GLint, "y1"), (GLint, "x2"), (GLint, "y2")]),
-    DllFunction(Void, "glRectiv", [(Pointer(Const(GLint)), "v1"), (Pointer(Const(GLint)), "v2")]),
-    DllFunction(Void, "glRects", [(GLshort, "x1"), (GLshort, "y1"), (GLshort, "x2"), (GLshort, "y2")]),
-    DllFunction(Void, "glRectsv", [(Pointer(Const(GLshort)), "v1"), (Pointer(Const(GLshort)), "v2")]),
-    DllFunction(Void, "glTexCoord1d", [(GLdouble, "s")]),
-    DllFunction(Void, "glTexCoord1dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glTexCoord1f", [(GLfloat, "s")]),
-    DllFunction(Void, "glTexCoord1fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glTexCoord1i", [(GLint, "s")]),
-    DllFunction(Void, "glTexCoord1iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glTexCoord1s", [(GLshort, "s")]),
-    DllFunction(Void, "glTexCoord1sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glTexCoord2d", [(GLdouble, "s"), (GLdouble, "t")]),
-    DllFunction(Void, "glTexCoord2dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glTexCoord2f", [(GLfloat, "s"), (GLfloat, "t")]),
-    DllFunction(Void, "glTexCoord2fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glTexCoord2i", [(GLint, "s"), (GLint, "t")]),
-    DllFunction(Void, "glTexCoord2iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glTexCoord2s", [(GLshort, "s"), (GLshort, "t")]),
-    DllFunction(Void, "glTexCoord2sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glTexCoord3d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
-    DllFunction(Void, "glTexCoord3dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glTexCoord3f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
-    DllFunction(Void, "glTexCoord3fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glTexCoord3i", [(GLint, "s"), (GLint, "t"), (GLint, "r")]),
-    DllFunction(Void, "glTexCoord3iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glTexCoord3s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
-    DllFunction(Void, "glTexCoord3sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glTexCoord4d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
-    DllFunction(Void, "glTexCoord4dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glTexCoord4f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
-    DllFunction(Void, "glTexCoord4fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glTexCoord4i", [(GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
-    DllFunction(Void, "glTexCoord4iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glTexCoord4s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
-    DllFunction(Void, "glTexCoord4sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glVertex2d", [(GLdouble, "x"), (GLdouble, "y")]),
-    DllFunction(Void, "glVertex2dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glVertex2f", [(GLfloat, "x"), (GLfloat, "y")]),
-    DllFunction(Void, "glVertex2fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glVertex2i", [(GLint, "x"), (GLint, "y")]),
-    DllFunction(Void, "glVertex2iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glVertex2s", [(GLshort, "x"), (GLshort, "y")]),
-    DllFunction(Void, "glVertex2sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glVertex3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    DllFunction(Void, "glVertex3dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glVertex3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    DllFunction(Void, "glVertex3fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glVertex3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    DllFunction(Void, "glVertex3iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glVertex3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    DllFunction(Void, "glVertex3sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glVertex4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    DllFunction(Void, "glVertex4dv", [(Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glVertex4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    DllFunction(Void, "glVertex4fv", [(Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glVertex4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    DllFunction(Void, "glVertex4iv", [(Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glVertex4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    DllFunction(Void, "glVertex4sv", [(Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glClipPlane", [(GLenum, "plane"), (Pointer(Const(GLdouble)), "equation")]),
-    DllFunction(Void, "glColorMaterial", [(GLenum, "face"), (GLenum, "mode")]),
-    DllFunction(Void, "glCullFace", [(GLenum, "mode")]),
-    DllFunction(Void, "glFogf", [(GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glFogfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glFogi", [(GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glFogiv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glFrontFace", [(GLenum, "mode")]),
-    DllFunction(Void, "glHint", [(GLenum, "target"), (GLenum, "mode")]),
-    DllFunction(Void, "glLightf", [(GLenum, "light"), (GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glLightfv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glLighti", [(GLenum, "light"), (GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glLightiv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glLightModelf", [(GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glLightModelfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glLightModeli", [(GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glLightModeliv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glLineStipple", [(GLint, "factor"), (GLushort, "pattern")]),
-    DllFunction(Void, "glLineWidth", [(GLfloat, "width")]),
-    DllFunction(Void, "glMaterialf", [(GLenum, "face"), (GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glMateriali", [(GLenum, "face"), (GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glPointSize", [(GLfloat, "size")]),
-    DllFunction(Void, "glPolygonMode", [(GLenum, "face"), (GLenum, "mode")]),
-    DllFunction(Void, "glPolygonStipple", [(Pointer(Const(GLubyte)), "mask")]),
-    DllFunction(Void, "glScissor", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-    DllFunction(Void, "glShadeModel", [(GLenum, "mode")]),
-    DllFunction(Void, "glTexParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glTexParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glTexEnvf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glTexEnvi", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glTexGend", [(GLenum, "coord"), (GLenum, "pname"), (GLdouble, "param")]),
-    DllFunction(Void, "glTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLdouble)), "params")]),
-    DllFunction(Void, "glTexGenf", [(GLenum, "coord"), (GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glTexGeni", [(GLenum, "coord"), (GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glFeedbackBuffer", [(GLsizei, "size"), (GLenum, "type"), (OutPointer(GLfloat), "buffer")]),
-    DllFunction(Void, "glSelectBuffer", [(GLsizei, "size"), (OutPointer(GLuint), "buffer")]),
-    DllFunction(GLint, "glRenderMode", [(GLenum, "mode")]),
-    DllFunction(Void, "glInitNames", []),
-    DllFunction(Void, "glLoadName", [(GLuint, "name")]),
-    DllFunction(Void, "glPassThrough", [(GLfloat, "token")]),
-    DllFunction(Void, "glPopName", []),
-    DllFunction(Void, "glPushName", [(GLuint, "name")]),
-    DllFunction(Void, "glDrawBuffer", [(GLenum, "mode")]),
-    DllFunction(Void, "glClear", [(GLbufferbitfield, "mask")]),
-    DllFunction(Void, "glClearAccum", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
-    DllFunction(Void, "glClearIndex", [(GLfloat, "c")]),
-    DllFunction(Void, "glClearColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]),
-    DllFunction(Void, "glClearStencil", [(GLint, "s")]),
-    DllFunction(Void, "glClearDepth", [(GLclampd, "depth")]),
-    DllFunction(Void, "glStencilMask", [(GLuint, "mask")]),
-    DllFunction(Void, "glColorMask", [(GLboolean, "red"), (GLboolean, "green"), (GLboolean, "blue"), (GLboolean, "alpha")]),
-    DllFunction(Void, "glDepthMask", [(GLboolean, "flag")]),
-    DllFunction(Void, "glIndexMask", [(GLuint, "mask")]),
-    DllFunction(Void, "glAccum", [(GLenum, "op"), (GLfloat, "value")]),
-    DllFunction(Void, "glDisable", [(GLenum, "cap")]),
-    DllFunction(Void, "glEnable", [(GLenum, "cap")]),
-    DllFunction(Void, "glFinish", []),
-    DllFunction(Void, "glFlush", []),
-    DllFunction(Void, "glPopAttrib", []),
-    DllFunction(Void, "glPushAttrib", [(GLbitfield, "mask")]),
-    DllFunction(Void, "glMap1d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLdouble)), "points")]),
-    DllFunction(Void, "glMap1f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLfloat)), "points")]),
-    DllFunction(Void, "glMap2d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLdouble, "v1"), (GLdouble, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLdouble)), "points")]),
-    DllFunction(Void, "glMap2f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLfloat, "v1"), (GLfloat, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLfloat)), "points")]),
-    DllFunction(Void, "glMapGrid1d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2")]),
-    DllFunction(Void, "glMapGrid1f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2")]),
-    DllFunction(Void, "glMapGrid2d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "vn"), (GLdouble, "v1"), (GLdouble, "v2")]),
-    DllFunction(Void, "glMapGrid2f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "vn"), (GLfloat, "v1"), (GLfloat, "v2")]),
-    DllFunction(Void, "glEvalCoord1d", [(GLdouble, "u")]),
-    DllFunction(Void, "glEvalCoord1dv", [(Pointer(Const(GLdouble)), "u")]),
-    DllFunction(Void, "glEvalCoord1f", [(GLfloat, "u")]),
-    DllFunction(Void, "glEvalCoord1fv", [(Pointer(Const(GLfloat)), "u")]),
-    DllFunction(Void, "glEvalCoord2d", [(GLdouble, "u"), (GLdouble, "v")]),
-    DllFunction(Void, "glEvalCoord2dv", [(Pointer(Const(GLdouble)), "u")]),
-    DllFunction(Void, "glEvalCoord2f", [(GLfloat, "u"), (GLfloat, "v")]),
-    DllFunction(Void, "glEvalCoord2fv", [(Pointer(Const(GLfloat)), "u")]),
-    DllFunction(Void, "glEvalMesh1", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2")]),
-    DllFunction(Void, "glEvalPoint1", [(GLint, "i")]),
-    DllFunction(Void, "glEvalMesh2", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2"), (GLint, "j1"), (GLint, "j2")]),
-    DllFunction(Void, "glEvalPoint2", [(GLint, "i"), (GLint, "j")]),
-    DllFunction(Void, "glAlphaFunc", [(GLenum, "func"), (GLclampf, "ref")]),
-    DllFunction(Void, "glBlendFunc", [(GLenum, "sfactor"), (GLenum, "dfactor")]),
-    DllFunction(Void, "glLogicOp", [(GLenum, "opcode")]),
-    DllFunction(Void, "glStencilFunc", [(GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
-    DllFunction(Void, "glStencilOp", [(GLenum, "fail"), (GLenum, "zfail"), (GLenum, "zpass")]),
-    DllFunction(Void, "glDepthFunc", [(GLenum, "func")]),
-    DllFunction(Void, "glPixelZoom", [(GLfloat, "xfactor"), (GLfloat, "yfactor")]),
-    DllFunction(Void, "glPixelTransferf", [(GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glPixelTransferi", [(GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glPixelStoref", [(GLenum, "pname"), (GLfloat, "param")]),
-    DllFunction(Void, "glPixelStorei", [(GLenum, "pname"), (GLint, "param")]),
-    DllFunction(Void, "glPixelMapfv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLfloat)), "values")]),
-    DllFunction(Void, "glPixelMapuiv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLuint)), "values")]),
-    DllFunction(Void, "glPixelMapusv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLushort)), "values")]),
-    DllFunction(Void, "glReadBuffer", [(GLenum, "mode")]),
-    DllFunction(Void, "glCopyPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "type")]),
-    DllFunction(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]),
-    DllFunction(Void, "glDrawPixels", [(GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glGetBooleanv", [(GLenum, "pname"), (OutPointer(GLboolean), "params")]),
-    DllFunction(Void, "glGetClipPlane", [(GLenum, "plane"), (OutPointer(GLdouble), "equation")]),
-    DllFunction(Void, "glGetDoublev", [(GLenum, "pname"), (OutPointer(GLdouble), "params")]),
-    DllFunction(GLenum, "glGetError", []),
-    DllFunction(Void, "glGetFloatv", [(GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetIntegerv", [(GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetLightfv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetLightiv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetMapdv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLdouble), "v")]),
-    DllFunction(Void, "glGetMapfv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLfloat), "v")]),
-    DllFunction(Void, "glGetMapiv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLint), "v")]),
-    DllFunction(Void, "glGetMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetPixelMapfv", [(GLenum, "map"), (OutPointer(GLfloat), "values")]),
-    DllFunction(Void, "glGetPixelMapuiv", [(GLenum, "map"), (OutPointer(GLuint), "values")]),
-    DllFunction(Void, "glGetPixelMapusv", [(GLenum, "map"), (OutPointer(GLushort), "values")]),
-    DllFunction(Void, "glGetPolygonStipple", [(OutPointer(GLubyte), "mask")]),
-    DllFunction(Alias("const GLubyte *", String), "glGetString", [(GLenum, "name")]),
-    DllFunction(Void, "glGetTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]),
-    DllFunction(Void, "glGetTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]),
-    DllFunction(Void, "glGetTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetTexLevelParameterfv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetTexLevelParameteriv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(GLboolean, "glIsEnabled", [(GLenum, "cap")]),
-    DllFunction(GLboolean, "glIsList", [(GLuint, "list")]),
-    DllFunction(Void, "glDepthRange", [(GLclampd, "zNear"), (GLclampd, "zFar")]),
-    DllFunction(Void, "glFrustum", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
-    DllFunction(Void, "glLoadIdentity", []),
-    DllFunction(Void, "glLoadMatrixf", [(Pointer(Const(GLfloat)), "m")]),
-    DllFunction(Void, "glLoadMatrixd", [(Pointer(Const(GLdouble)), "m")]),
-    DllFunction(Void, "glMatrixMode", [(GLenum, "mode")]),
-    DllFunction(Void, "glMultMatrixf", [(Pointer(Const(GLfloat)), "m")]),
-    DllFunction(Void, "glMultMatrixd", [(Pointer(Const(GLdouble)), "m")]),
-    DllFunction(Void, "glOrtho", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
-    DllFunction(Void, "glPopMatrix", []),
-    DllFunction(Void, "glPushMatrix", []),
-    DllFunction(Void, "glRotated", [(GLdouble, "angle"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    DllFunction(Void, "glRotatef", [(GLfloat, "angle"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    DllFunction(Void, "glScaled", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    DllFunction(Void, "glScalef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    DllFunction(Void, "glTranslated", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    DllFunction(Void, "glTranslatef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    DllFunction(Void, "glViewport", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-    DllFunction(Void, "glArrayElement", [(GLint, "i")]),
-    DllFunction(Void, "glBindTexture", [(GLenum, "target"), (GLuint, "texture")]),
-    DllFunction(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glDisableClientState", [(GLenum, "array")]),
-    DllFunction(Void, "glDrawArrays", [(GLenum, "mode"), (GLint, "first"), (GLsizei, "count")]),
-    DllFunction(Void, "glDrawElements", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]),
-    DllFunction(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glEnableClientState", [(GLenum, "array")]),
-    DllFunction(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glIndexub", [(GLubyte, "c")]),
-    DllFunction(Void, "glIndexubv", [(Pointer(Const(GLubyte)), "c")]),
-    DllFunction(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]),
-    DllFunction(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    DllFunction(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (OutPointer(GLboolean), "residences")]),
-    DllFunction(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]),
-    DllFunction(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]),
-    DllFunction(Void, "glCopyTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
-    DllFunction(Void, "glCopyTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-    DllFunction(Void, "glDeleteTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures")]),
-    DllFunction(Void, "glGenTextures", [(GLsizei, "n"), (OutPointer(GLuint), "textures")]),
-    DllFunction(Void, "glGetPointerv", [(GLenum, "pname"), (OutPointer(Pointer(GLvoid)), "params")]),
-    DllFunction(GLboolean, "glIsTexture", [(GLuint, "texture")]),
-    DllFunction(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (Pointer(Const(GLclampf)), "priorities")]),
-    DllFunction(Void, "glTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glPopClientAttrib", []),
-    DllFunction(Void, "glPushClientAttrib", [(GLbitfield, "mask")]),
-    DllFunction(Void, "glBlendColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]),
-    DllFunction(Void, "glBlendEquation", [(GLenum, "mode")]),
-    DllFunction(Void, "glDrawRangeElements", [(GLenum, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]),
-    DllFunction(Void, "glColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "table")]),
-    DllFunction(Void, "glColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glCopyColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
-    DllFunction(Void, "glGetColorTable", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "table")]),
-    DllFunction(Void, "glGetColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLsizei, "count"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "data")]),
-    DllFunction(Void, "glCopyColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
-    DllFunction(Void, "glConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]),
-    DllFunction(Void, "glConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]),
-    DllFunction(Void, "glConvolutionParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "params")]),
-    DllFunction(Void, "glConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    DllFunction(Void, "glConvolutionParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "params")]),
-    DllFunction(Void, "glConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    DllFunction(Void, "glCopyConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
-    DllFunction(Void, "glCopyConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-    DllFunction(Void, "glGetConvolutionFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "image")]),
-    DllFunction(Void, "glGetConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "row"), (Pointer(GLvoid), "column"), (Pointer(GLvoid), "span")]),
-    DllFunction(Void, "glSeparableFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "row"), (Pointer(Const(GLvoid)), "column")]),
-    DllFunction(Void, "glGetHistogram", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]),
-    DllFunction(Void, "glGetHistogramParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetHistogramParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glGetMinmax", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]),
-    DllFunction(Void, "glGetMinmaxParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
-    DllFunction(Void, "glGetMinmaxParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
-    DllFunction(Void, "glHistogram", [(GLenum, "target"), (GLsizei, "width"), (GLenum, "internalformat"), (GLboolean, "sink")]),
-    DllFunction(Void, "glMinmax", [(GLenum, "target"), (GLenum, "internalformat"), (GLboolean, "sink")]),
-    DllFunction(Void, "glResetHistogram", [(GLenum, "target")]),
-    DllFunction(Void, "glResetMinmax", [(GLenum, "target")]),
-    DllFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
-    DllFunction(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-    DllFunction(Void, "glActiveTextureARB", [(GLenum, "texture")]),
-    DllFunction(Void, "glClientActiveTextureARB", [(GLenum, "texture")]),
-    DllFunction(Void, "glMultiTexCoord1dARB", [(GLenum, "target"), (GLdouble, "s")]),
-    DllFunction(Void, "glMultiTexCoord1dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glMultiTexCoord1fARB", [(GLenum, "target"), (GLfloat, "s")]),
-    DllFunction(Void, "glMultiTexCoord1fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glMultiTexCoord1iARB", [(GLenum, "target"), (GLint, "s")]),
-    DllFunction(Void, "glMultiTexCoord1ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glMultiTexCoord1sARB", [(GLenum, "target"), (GLshort, "s")]),
-    DllFunction(Void, "glMultiTexCoord1svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glMultiTexCoord2dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]),
-    DllFunction(Void, "glMultiTexCoord2dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glMultiTexCoord2fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]),
-    DllFunction(Void, "glMultiTexCoord2fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glMultiTexCoord2iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]),
-    DllFunction(Void, "glMultiTexCoord2ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glMultiTexCoord2sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]),
-    DllFunction(Void, "glMultiTexCoord2svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glMultiTexCoord3dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
-    DllFunction(Void, "glMultiTexCoord3dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glMultiTexCoord3fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
-    DllFunction(Void, "glMultiTexCoord3fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glMultiTexCoord3iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]),
-    DllFunction(Void, "glMultiTexCoord3ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glMultiTexCoord3sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
-    DllFunction(Void, "glMultiTexCoord3svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
-    DllFunction(Void, "glMultiTexCoord4dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
-    DllFunction(Void, "glMultiTexCoord4dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]),
-    DllFunction(Void, "glMultiTexCoord4fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
-    DllFunction(Void, "glMultiTexCoord4fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]),
-    DllFunction(Void, "glMultiTexCoord4iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
-    DllFunction(Void, "glMultiTexCoord4ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]),
-    DllFunction(Void, "glMultiTexCoord4sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
-    DllFunction(Void, "glMultiTexCoord4svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
-]
+opengl32.functions += basic_functions(DllFunction)
 
 HGLRC = Alias("HGLRC", HANDLE)
-PROC = Intrinsic("PROC", "%p")
+PROC = Opaque("PROC")
 
 PFD = Flags(DWORD, [
     "PFD_DOUBLEBUFFER",
@@ -455,7 +46,10 @@ PFD = Flags(DWORD, [
     "PFD_SWAP_COPY",
     "PFD_SWAP_LAYER_BUFFERS",
     "PFD_GENERIC_ACCELERATED",
-    #"PFD_SUPPORT_DIRECTDRAW",
+    "PFD_SUPPORT_DIRECTDRAW",
+    "PFD_DEPTH_DONTCARE",
+    "PFD_DOUBLEBUFFER_DONTCARE",
+    "PFD_STEREO_DONTCARE",
 ])
 
 PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [
@@ -532,17 +126,22 @@ LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [
 ])
 LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR)
 
+WGLSWAP = Struct("WGLSWAP", [
+   (HDC, "hdc"),
+    (UINT, "uiFlags"),
+])
+
 opengl32.functions += [
     DllFunction(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]),
     DllFunction(HGLRC, "wglCreateContext", [(HDC, "hdc")]),
     DllFunction(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]),
     DllFunction(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]),
-    DllFunction(HGLRC, "wglGetCurrentContext", []),
-    DllFunction(HDC, "wglGetCurrentDC", []),
-    DllFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")]),
+    DllFunction(HGLRC, "wglGetCurrentContext", [], sideeffects=False),
+    DllFunction(HDC, "wglGetCurrentDC", [], sideeffects=False),
+    DllFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")], sideeffects=False),
     DllFunction(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), 
-    DllFunction(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), (OutPointer(PIXELFORMATDESCRIPTOR), "ppfd")]),
-    DllFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")]),
+    DllFunction(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), Out(Pointer(PIXELFORMATDESCRIPTOR), "ppfd")]),
+    DllFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")], sideeffects=False),
     DllFunction(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]),
     DllFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]),
     DllFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]),
@@ -551,28 +150,19 @@ opengl32.functions += [
     DllFunction(BOOL, "wglSwapBuffers", [(HDC, "hdc")]),
     DllFunction(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
     DllFunction(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
-    DllFunction(BOOL , "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), (OutPointer(LAYERPLANEDESCRIPTOR), "plpd")]),
-    DllFunction(Int  , "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Pointer(Const(COLORREF)), "pcr")]),
-    DllFunction(Int  , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (OutPointer(COLORREF), "pcr")]),
+    DllFunction(BOOL , "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), Out(Pointer(LAYERPLANEDESCRIPTOR), "plpd")]),
+    DllFunction(Int  , "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Array(Const(COLORREF), "cEntries"), "pcr")]),
+    DllFunction(Int  , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), Out(Array(COLORREF, "cEntries"), "pcr")], sideeffects=False),
     DllFunction(BOOL , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]),
     DllFunction(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]),
+    DllFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Array(Const(WGLSWAP), "n"), "ps")]),
 ]
 
-if False:
-    WGLSWAP = Struct("WGLSWAP", [
-        (HDC, "hdc"),
-        (UINT, "uiFlags"),
-    ])
-
-    opengl32.functions += [
-        DllFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]),
-    ]
-
 
 class WglGetProcAddressFunction(DllFunction):
 
-    def __init__(self, type, name, args):
-        DllFunction.__init__(self, type, name, args)
+    def __init__(self, type, name, args **kwargs):
+        DllFunction.__init__(self, type, name, args **kwargs)
         self.functions = []
 
     def wrap_decl(self):
@@ -658,392 +248,27 @@ attribute = FakeEnum(Int, [
 
 HPBUFFERARB = Alias("HPBUFFERARB", HANDLE)
 
+wglgetprocaddress.functions += extended_functions(WglFunction)
+
 wglgetprocaddress.functions += [
-    WglFunction(Void, "glAttachShader", [(GLuint, "program"), (GLuint, "shader")]),
-    WglFunction(GLuint, "glCreateProgram", []),
-    WglFunction(GLuint, "glCreateShader", [(GLenum, "type")]),
-    WglFunction(Void, "glDeleteProgram", [(GLuint, "program")]),
-    WglFunction(Void, "glDeleteShader", [(GLuint, "program")]),
-    WglFunction(Void, "glDetachShader", [(GLuint, "program"), (GLuint, "shader")]),
-    WglFunction(Void, "glGetAttachedShaders", [(GLuint, "program"), (GLsizei, "maxCount"), (Pointer(GLsizei), "count"), (Pointer(GLuint), "obj")]),
-    WglFunction(Void, "glGetProgramInfoLog", [(GLuint, "program"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLchar), "infoLog")]),
-    WglFunction(Void, "glGetProgramiv", [(GLuint, "program"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetShaderInfoLog", [(GLuint, "shader"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLchar), "infoLog")]),
-    WglFunction(Void, "glGetShaderiv", [(GLuint, "shader"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(GLboolean, "glIsProgram", [(GLuint, "program")]),
-    WglFunction(GLboolean, "glIsShader", [(GLuint, "shader")]),
-    WglFunction(Void, "glStencilFuncSeparate", [(GLenum, "face"), (GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
-    WglFunction(Void, "glStencilMaskSeparate", [(GLenum, "face"), (GLuint, "mask")]),
-    WglFunction(Void, "glStencilOpSeparate", [(GLenum, "face"), (GLenum, "sfail"), (GLenum, "zfail"), (GLenum, "zpass")]),
-    WglFunction(Void, "glUniformMatrix2x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix2x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix3x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix3x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix4x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix4x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glLoadTransposeMatrixdARB", [(Pointer(Const(GLdouble)), "m")]),
-    WglFunction(Void, "glLoadTransposeMatrixfARB", [(Pointer(Const(GLfloat)), "m")]),
-    WglFunction(Void, "glMultTransposeMatrixdARB", [(Pointer(Const(GLdouble)), "m")]),
-    WglFunction(Void, "glMultTransposeMatrixfARB", [(Pointer(Const(GLfloat)), "m")]),
-    WglFunction(Void, "glSampleCoverageARB", [(GLclampf, "value"), (GLboolean, "invert")]),
-    WglFunction(Void, "glCompressedTexImage1DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glCompressedTexImage2DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glCompressedTexImage3DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glCompressedTexSubImage1DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glCompressedTexSubImage2DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glCompressedTexSubImage3DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glGetCompressedTexImageARB", [(GLenum, "target"), (GLint, "level"), (Pointer(GLvoid), "img")]),
-    WglFunction(Void, "glDisableVertexAttribArrayARB", [(GLuint, "index")]),
-    WglFunction(Void, "glEnableVertexAttribArrayARB", [(GLuint, "index")]),
-    WglFunction(Void, "glGetProgramEnvParameterdvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetProgramEnvParameterfvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetProgramLocalParameterdvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetProgramLocalParameterfvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetProgramStringARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLvoid), "string")]),
-    WglFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glProgramEnvParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(Const(GLdouble)), "params")]),
-    WglFunction(Void, "glProgramEnvParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glProgramLocalParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(Const(GLdouble)), "params")]),
-    WglFunction(Void, "glProgramLocalParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glProgramStringARB", [(GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (Pointer(Const(GLvoid)), "string")]),
-    WglFunction(Void, "glVertexAttrib1dARB", [(GLuint, "index"), (GLdouble, "x")]),
-    WglFunction(Void, "glVertexAttrib1dvARB", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib1fARB", [(GLuint, "index"), (GLfloat, "x")]),
-    WglFunction(Void, "glVertexAttrib1fvARB", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib1sARB", [(GLuint, "index"), (GLshort, "x")]),
-    WglFunction(Void, "glVertexAttrib1svARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib2dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
-    WglFunction(Void, "glVertexAttrib2dvARB", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib2fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
-    WglFunction(Void, "glVertexAttrib2fvARB", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib2sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
-    WglFunction(Void, "glVertexAttrib2svARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib3dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    WglFunction(Void, "glVertexAttrib3dvARB", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib3fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    WglFunction(Void, "glVertexAttrib3fvARB", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib3sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    WglFunction(Void, "glVertexAttrib3svARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NbvARB", [(GLuint, "index"), (Pointer(Const(GLbyte)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NivARB", [(GLuint, "index"), (Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NsvARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NubARB", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
-    WglFunction(Void, "glVertexAttrib4NubvARB", [(GLuint, "index"), (Pointer(Const(GLubyte)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NuivARB", [(GLuint, "index"), (Pointer(Const(GLuint)), "v")]),
-    WglFunction(Void, "glVertexAttrib4NusvARB", [(GLuint, "index"), (Pointer(Const(GLushort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4bvARB", [(GLuint, "index"), (Pointer(Const(GLbyte)), "v")]),
-    WglFunction(Void, "glVertexAttrib4dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glVertexAttrib4dvARB", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib4fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glVertexAttrib4fvARB", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib4ivARB", [(GLuint, "index"), (Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glVertexAttrib4sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    WglFunction(Void, "glVertexAttrib4svARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4ubvARB", [(GLuint, "index"), (Pointer(Const(GLubyte)), "v")]),
-    WglFunction(Void, "glVertexAttrib4uivARB", [(GLuint, "index"), (Pointer(Const(GLuint)), "v")]),
-    WglFunction(Void, "glVertexAttrib4usvARB", [(GLuint, "index"), (Pointer(Const(GLushort)), "v")]),
-    WglFunction(Void, "glVertexAttribPointerARB", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glBindBufferARB", [(GLenum, "target"), (GLuint, "buffer")]),
-    WglFunction(Void, "glBufferDataARB", [(GLenum, "target"), (GLsizeiptrARB, "size"), (Pointer(Const(GLvoid)), "data"), (GLenum, "usage")]),
-    WglFunction(Void, "glBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (Pointer(Const(GLvoid)), "data")]),
-    WglFunction(Void, "glDeleteBuffersARB", [(GLsizei, "n"), (Pointer(Const(GLuint)), "buffer")]),
-    WglFunction(Void, "glGenBuffersARB", [(GLsizei, "n"), (Pointer(GLuint), "buffer")]),
-    WglFunction(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "params")]),
-    WglFunction(Void, "glGetBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (Pointer(GLvoid), "data")]),
-    WglFunction(GLboolean, "glIsBufferARB", [(GLuint, "buffer")]),
-    WglFunction(Pointer(GLvoid), "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]),
-    WglFunction(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]),
-    WglFunction(Void, "glBeginQueryARB", [(GLenum, "target"), (GLuint, "id")]),
-    WglFunction(Void, "glDeleteQueriesARB", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids")]),
-    WglFunction(Void, "glEndQueryARB", [(GLenum, "target")]),
-    WglFunction(Void, "glGenQueriesARB", [(GLsizei, "n"), (Pointer(GLuint), "ids")]),
-    WglFunction(Void, "glGetQueryObjectivARB", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetQueryObjectuivARB", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLuint), "params")]),
-    WglFunction(Void, "glGetQueryivARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(GLboolean, "glIsQueryARB", [(GLuint, "id")]),
-    WglFunction(Void, "glAttachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "obj")]),
-    WglFunction(Void, "glCompileShaderARB", [(GLhandleARB, "shader")]),
-    WglFunction(GLhandleARB, "glCreateProgramObjectARB", []),
-    WglFunction(GLhandleARB, "glCreateShaderObjectARB", [(GLenum, "shaderType")]),
-    WglFunction(Void, "glDeleteObjectARB", [(GLhandleARB, "obj")]),
-    WglFunction(Void, "glDetachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "attachedObj")]),
-    WglFunction(Void, "glGetActiveUniformARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
-    WglFunction(Void, "glGetAttachedObjectsARB", [(GLhandleARB, "containerObj"), (GLsizei, "maxLength"), (Pointer(GLsizei), "length"), (Pointer(GLhandleARB), "infoLog")]),
-    WglFunction(GLhandleARB, "glGetHandleARB", [(GLenum, "pname")]),
-    WglFunction(Void, "glGetInfoLogARB", [(GLhandleARB, "obj"), (GLsizei, "maxLength"), (Pointer(GLsizei), "length"), (Pointer(GLcharARB), "infoLog")]),
-    WglFunction(Void, "glGetObjectParameterfvARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetObjectParameterivARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLcharARB), "source")]),
-    WglFunction(GLint, "glGetUniformLocationARB", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
-    WglFunction(Void, "glGetUniformfvARB", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetUniformivARB", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glLinkProgramARB", [(GLhandleARB, "program")]),
-    WglFunction(Void, "glShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "count"), (Pointer(Pointer(Const(GLcharARB))), "string"), (Pointer(Const(GLint)), "length")]),
-    WglFunction(Void, "glUniform1fARB", [(GLint, "location"), (GLfloat, "v0")]),
-    WglFunction(Void, "glUniform1fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniform1iARB", [(GLint, "location"), (GLint, "v0")]),
-    WglFunction(Void, "glUniform1ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
-    WglFunction(Void, "glUniform2fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1")]),
-    WglFunction(Void, "glUniform2fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniform2iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1")]),
-    WglFunction(Void, "glUniform2ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
-    WglFunction(Void, "glUniform3fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2")]),
-    WglFunction(Void, "glUniform3fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniform3iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2")]),
-    WglFunction(Void, "glUniform3ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
-    WglFunction(Void, "glUniform4fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2"), (GLfloat, "v3")]),
-    WglFunction(Void, "glUniform4fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniform4iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2"), (GLint, "v3")]),
-    WglFunction(Void, "glUniform4ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
-    WglFunction(Void, "glUniformMatrix2fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix3fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUniformMatrix4fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glUseProgramObjectARB", [(GLhandleARB, "program")]),
-    WglFunction(Void, "glValidateProgramARB", [(GLhandleARB, "program")]),
-    WglFunction(Void, "glBindAttribLocationARB", [(GLhandleARB, "program"), (GLuint, "index"), (Pointer(Const(GLcharARB)), "name")]),
-    WglFunction(Void, "glGetActiveAttribARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
-    WglFunction(GLint, "glGetAttribLocationARB", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
-    WglFunction(Void, "glDrawBuffersARB", [(GLsizei, "n"), (Pointer(Const(GLenum)), "bufs")]),
-    WglFunction(Void, "glRenderbufferStorageMultisample", [(GLenum, "target"), (GLsizei, "samples"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
-    WglFunction(Void, "glPolygonOffsetEXT", [(GLfloat, "factor"), (GLfloat, "bias")]),
-    WglFunction(Void, "glGetPixelTexGenParameterfvSGIS", [(GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetPixelTexGenParameterivSGIS", [(GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glPixelTexGenParameterfSGIS", [(GLenum, "pname"), (GLfloat, "param")]),
-    WglFunction(Void, "glPixelTexGenParameterfvSGIS", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glPixelTexGenParameteriSGIS", [(GLenum, "pname"), (GLint, "param")]),
-    WglFunction(Void, "glPixelTexGenParameterivSGIS", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    WglFunction(Void, "glSampleMaskSGIS", [(GLclampf, "value"), (GLboolean, "invert")]),
-    WglFunction(Void, "glSamplePatternSGIS", [(GLenum, "pattern")]),
-    WglFunction(Void, "glColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glEdgeFlagPointerEXT", [(GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLboolean)), "pointer")]),
-    WglFunction(Void, "glIndexPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glNormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glTexCoordPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glVertexPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glPointParameterfEXT", [(GLenum, "pname"), (GLfloat, "param")]),
-    WglFunction(Void, "glPointParameterfvEXT", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glLockArraysEXT", [(GLint, "first"), (GLsizei, "count")]),
-    WglFunction(Void, "glUnlockArraysEXT", []),
-    WglFunction(Void, "glCullParameterdvEXT", [(GLenum, "pname"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glCullParameterfvEXT", [(GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glSecondaryColor3bEXT", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
-    WglFunction(Void, "glSecondaryColor3bvEXT", [(Pointer(Const(GLbyte)), "v")]),
-    WglFunction(Void, "glSecondaryColor3dEXT", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
-    WglFunction(Void, "glSecondaryColor3dvEXT", [(Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glSecondaryColor3fEXT", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
-    WglFunction(Void, "glSecondaryColor3fvEXT", [(Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glSecondaryColor3iEXT", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
-    WglFunction(Void, "glSecondaryColor3ivEXT", [(Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glSecondaryColor3sEXT", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
-    WglFunction(Void, "glSecondaryColor3svEXT", [(Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glSecondaryColor3ubEXT", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
-    WglFunction(Void, "glSecondaryColor3ubvEXT", [(Pointer(Const(GLubyte)), "v")]),
-    WglFunction(Void, "glSecondaryColor3uiEXT", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
-    WglFunction(Void, "glSecondaryColor3uivEXT", [(Pointer(Const(GLuint)), "v")]),
-    WglFunction(Void, "glSecondaryColor3usEXT", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
-    WglFunction(Void, "glSecondaryColor3usvEXT", [(Pointer(Const(GLushort)), "v")]),
-    WglFunction(Void, "glSecondaryColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glMultiDrawArraysEXT", [(GLenum, "mode"), (Pointer(GLint), "first"), (Pointer(GLsizei), "count"), (GLsizei, "primcount")]),
-    WglFunction(Void, "glMultiDrawElementsEXT", [(GLenum, "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Pointer(Const(GLvoid))), "indices"), (GLsizei, "primcount")]),
-    WglFunction(Void, "glFogCoordPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glFogCoorddEXT", [(GLdouble, "coord")]),
-    WglFunction(Void, "glFogCoorddvEXT", [(Pointer(Const(GLdouble)), "coord")]),
-    WglFunction(Void, "glFogCoordfEXT", [(GLfloat, "coord")]),
-    WglFunction(Void, "glFogCoordfvEXT", [(Pointer(Const(GLfloat)), "coord")]),
-    WglFunction(Void, "glPixelTexGenSGIX", [(GLenum, "mode")]),
-    WglFunction(Void, "glBlendFuncSeparateEXT", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
-    WglFunction(Void, "glFlushVertexArrayRangeNV", []),
-    WglFunction(Void, "glVertexArrayRangeNV", [(GLsizei, "length"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glCombinerInputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
-    WglFunction(Void, "glCombinerOutputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "abOutput"), (GLenum, "cdOutput"), (GLenum, "sumOutput"), (GLenum, "scale"), (GLenum, "bias"), (GLboolean, "abDotProduct"), (GLboolean, "cdDotProduct"), (GLboolean, "muxSum")]),
-    WglFunction(Void, "glCombinerParameterfNV", [(GLenum, "pname"), (GLfloat, "param")]),
-    WglFunction(Void, "glCombinerParameterfvNV", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glCombinerParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
-    WglFunction(Void, "glCombinerParameterivNV", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    WglFunction(Void, "glFinalCombinerInputNV", [(GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
-    WglFunction(Void, "glGetCombinerInputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetCombinerInputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetCombinerOutputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetCombinerOutputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetFinalCombinerInputParameterfvNV", [(GLenum, "variable"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetFinalCombinerInputParameterivNV", [(GLenum, "variable"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glResizeBuffersMESA", []),
-    WglFunction(Void, "glWindowPos2dMESA", [(GLdouble, "x"), (GLdouble, "y")]),
-    WglFunction(Void, "glWindowPos2dvMESA", [(Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glWindowPos2fMESA", [(GLfloat, "x"), (GLfloat, "y")]),
-    WglFunction(Void, "glWindowPos2fvMESA", [(Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glWindowPos2iMESA", [(GLint, "x"), (GLint, "y")]),
-    WglFunction(Void, "glWindowPos2ivMESA", [(Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glWindowPos2sMESA", [(GLshort, "x"), (GLshort, "y")]),
-    WglFunction(Void, "glWindowPos2svMESA", [(Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glWindowPos3dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    WglFunction(Void, "glWindowPos3dvMESA", [(Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glWindowPos3fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    WglFunction(Void, "glWindowPos3fvMESA", [(Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glWindowPos3iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    WglFunction(Void, "glWindowPos3ivMESA", [(Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glWindowPos3sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    WglFunction(Void, "glWindowPos3svMESA", [(Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glWindowPos4dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glWindowPos4dvMESA", [(Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glWindowPos4fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glWindowPos4fvMESA", [(Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glWindowPos4iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    WglFunction(Void, "glWindowPos4ivMESA", [(Pointer(Const(GLint)), "v")]),
-    WglFunction(Void, "glWindowPos4sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    WglFunction(Void, "glWindowPos4svMESA", [(Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glMultiModeDrawArraysIBM", [(Pointer(Const(GLenum)), "mode"), (Pointer(Const(GLint)), "first"), (Pointer(Const(GLsizei)), "count"), (GLsizei, "primcount"), (GLint, "modestride")]),
-    WglFunction(Void, "glMultiModeDrawElementsIBM", [(Pointer(Const(GLenum)), "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Const(Pointer(Const(GLvoid)))), "indices"), (GLsizei, "primcount"), (GLint, "modestride")]),
-    WglFunction(Void, "glDeleteFencesNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "fences")]),
-    WglFunction(Void, "glFinishFenceNV", [(GLuint, "fence")]),
-    WglFunction(Void, "glGenFencesNV", [(GLsizei, "n"), (Pointer(GLuint), "fences")]),
-    WglFunction(Void, "glGetFenceivNV", [(GLuint, "fence"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(GLboolean, "glIsFenceNV", [(GLuint, "fence")]),
-    WglFunction(Void, "glSetFenceNV", [(GLuint, "fence"), (GLenum, "condition")]),
-    WglFunction(GLboolean, "glTestFenceNV", [(GLuint, "fence")]),
-    WglFunction(GLboolean, "glAreProgramsResidentNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids"), (Pointer(GLboolean), "residences")]),
-    WglFunction(Void, "glBindProgramNV", [(GLenum, "target"), (GLuint, "program")]),
-    WglFunction(Void, "glDeleteProgramsNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "programs")]),
-    WglFunction(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLuint, "id"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glGenProgramsNV", [(GLsizei, "n"), (Pointer(GLuint), "programs")]),
-    WglFunction(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetProgramStringNV", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLubyte), "program")]),
-    WglFunction(Void, "glGetProgramivNV", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetVertexAttribPointervNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "pointer")]),
-    WglFunction(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetVertexAttribfvNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glGetVertexAttribivNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(GLboolean, "glIsProgramNV", [(GLuint, "program")]),
-    WglFunction(Void, "glLoadProgramNV", [(GLenum, "target"), (GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "program")]),
-    WglFunction(Void, "glProgramParameters4dvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (Pointer(Const(GLdouble)), "params")]),
-    WglFunction(Void, "glProgramParameters4fvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glRequestResidentProgramsNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids")]),
-    WglFunction(Void, "glTrackMatrixNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "matrix"), (GLenum, "transform")]),
-    WglFunction(Void, "glVertexAttrib1dNV", [(GLuint, "index"), (GLdouble, "x")]),
-    WglFunction(Void, "glVertexAttrib1dvNV", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib1fNV", [(GLuint, "index"), (GLfloat, "x")]),
-    WglFunction(Void, "glVertexAttrib1fvNV", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib1sNV", [(GLuint, "index"), (GLshort, "x")]),
-    WglFunction(Void, "glVertexAttrib1svNV", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib2dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
-    WglFunction(Void, "glVertexAttrib2dvNV", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib2fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
-    WglFunction(Void, "glVertexAttrib2fvNV", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib2sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
-    WglFunction(Void, "glVertexAttrib2svNV", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib3dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    WglFunction(Void, "glVertexAttrib3dvNV", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib3fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    WglFunction(Void, "glVertexAttrib3fvNV", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib3sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    WglFunction(Void, "glVertexAttrib3svNV", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glVertexAttrib4dvNV", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttrib4fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glVertexAttrib4fvNV", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttrib4sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    WglFunction(Void, "glVertexAttrib4svNV", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttrib4ubNV", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
-    WglFunction(Void, "glVertexAttrib4ubvNV", [(GLuint, "index"), (Pointer(Const(GLubyte)), "v")]),
-    WglFunction(Void, "glVertexAttribPointerNV", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
-    WglFunction(Void, "glVertexAttribs1dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttribs1fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttribs1svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttribs2dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttribs2fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttribs2svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttribs3dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttribs3fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttribs3svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttribs4dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glVertexAttribs4fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glVertexAttribs4svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
-    WglFunction(Void, "glVertexAttribs4ubvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLubyte)), "v")]),
-    WglFunction(Void, "glGetTexBumpParameterfvATI", [(GLenum, "pname"), (Pointer(GLfloat), "param")]),
-    WglFunction(Void, "glGetTexBumpParameterivATI", [(GLenum, "pname"), (Pointer(GLint), "param")]),
-    WglFunction(Void, "glTexBumpParameterfvATI", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "param")]),
-    WglFunction(Void, "glTexBumpParameterivATI", [(GLenum, "pname"), (Pointer(Const(GLint)), "param")]),
-    WglFunction(Void, "glAlphaFragmentOp1ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod")]),
-    WglFunction(Void, "glAlphaFragmentOp2ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod")]),
-    WglFunction(Void, "glAlphaFragmentOp3ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod"), (GLuint, "arg3"), (GLuint, "arg3Rep"), (GLuint, "arg3Mod")]),
-    WglFunction(Void, "glBeginFragmentShaderATI", []),
-    WglFunction(Void, "glBindFragmentShaderATI", [(GLuint, "id")]),
-    WglFunction(Void, "glColorFragmentOp1ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod")]),
-    WglFunction(Void, "glColorFragmentOp2ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod")]),
-    WglFunction(Void, "glColorFragmentOp3ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod"), (GLuint, "arg3"), (GLuint, "arg3Rep"), (GLuint, "arg3Mod")]),
-    WglFunction(Void, "glDeleteFragmentShaderATI", [(GLuint, "id")]),
-    WglFunction(Void, "glEndFragmentShaderATI", []),
-    WglFunction(GLuint, "glGenFragmentShadersATI", [(GLuint, "range")]),
-    WglFunction(Void, "glPassTexCoordATI", [(GLuint, "dst"), (GLuint, "coord"), (GLenum, "swizzle")]),
-    WglFunction(Void, "glSampleMapATI", [(GLuint, "dst"), (GLuint, "interp"), (GLenum, "swizzle")]),
-    WglFunction(Void, "glSetFragmentShaderConstantATI", [(GLuint, "dst"), (Pointer(Const(GLfloat)), "value")]),
-    WglFunction(Void, "glPointParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
-    WglFunction(Void, "glPointParameterivNV", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
-    WglFunction(Void, "glActiveStencilFaceEXT", [(GLenum, "face")]),
-    WglFunction(Void, "glBindVertexArrayAPPLE", [(GLuint, "array")]),
-    WglFunction(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Pointer(Const(GLuint)), "arrays")]),
-    WglFunction(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), (Pointer(GLuint), "arrays")]),
-    WglFunction(GLboolean, "glIsVertexArrayAPPLE", [(GLuint, "array")]),
-    WglFunction(Void, "glGetProgramNamedParameterdvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Pointer(GLdouble), "params")]),
-    WglFunction(Void, "glGetProgramNamedParameterfvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Pointer(GLfloat), "params")]),
-    WglFunction(Void, "glProgramNamedParameter4dNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    WglFunction(Void, "glProgramNamedParameter4dvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Pointer(Const(GLdouble)), "v")]),
-    WglFunction(Void, "glProgramNamedParameter4fNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    WglFunction(Void, "glProgramNamedParameter4fvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Pointer(Const(GLfloat)), "v")]),
-    WglFunction(Void, "glDepthBoundsEXT", [(GLclampd, "zmin"), (GLclampd, "zmax")]),
-    WglFunction(Void, "glBlendEquationSeparateEXT", [(GLenum, "modeRGB"), (GLenum, "modeA")]),
-    WglFunction(Void, "glBindFramebufferEXT", [(GLenum, "target"), (GLuint, "framebuffer")]),
-    WglFunction(Void, "glBindRenderbufferEXT", [(GLenum, "target"), (GLuint, "renderbuffer")]),
-    WglFunction(GLenum, "glCheckFramebufferStatusEXT", [(GLenum, "target")]),
-    WglFunction(Void, "glDeleteFramebuffersEXT", [(GLsizei, "n"), (Pointer(Const(GLuint)), "framebuffers")]),
-    WglFunction(Void, "glDeleteRenderbuffersEXT", [(GLsizei, "n"), (Pointer(Const(GLuint)), "renderbuffers")]),
-    WglFunction(Void, "glFramebufferRenderbufferEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
-    WglFunction(Void, "glFramebufferTexture1DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
-    WglFunction(Void, "glFramebufferTexture2DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
-    WglFunction(Void, "glFramebufferTexture3DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level"), (GLint, "zoffset")]),
-    WglFunction(Void, "glGenFramebuffersEXT", [(GLsizei, "n"), (Pointer(GLuint), "framebuffers")]),
-    WglFunction(Void, "glGenRenderbuffersEXT", [(GLsizei, "n"), (Pointer(GLuint), "renderbuffers")]),
-    WglFunction(Void, "glGenerateMipmapEXT", [(GLenum, "target")]),
-    WglFunction(Void, "glGetFramebufferAttachmentParameterivEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(Void, "glGetRenderbufferParameterivEXT", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
-    WglFunction(GLboolean, "glIsFramebufferEXT", [(GLuint, "framebuffer")]),
-    WglFunction(GLboolean, "glIsRenderbufferEXT", [(GLuint, "renderbuffer")]),
-    WglFunction(Void, "glRenderbufferStorageEXT", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
-    WglFunction(Void, "glBlitFramebufferEXT", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield, "mask"), (GLenum, "filter")]),
-    WglFunction(Void, "glFramebufferTextureLayerEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLuint, "texture"), (GLint, "level"), (GLint, "layer")]),
-    WglFunction(Void, "glStencilFuncSeparateATI", [(GLenum, "frontfunc"), (GLenum, "backfunc"), (GLint, "ref"), (GLuint, "mask")]),
-    WglFunction(Void, "glProgramEnvParameters4fvEXT", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glProgramLocalParameters4fvEXT", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "params")]),
-    WglFunction(Void, "glGetQueryObjecti64vEXT", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLint64EXT), "params")]),
-    WglFunction(Void, "glGetQueryObjectui64vEXT", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLuint64EXT), "params")]),
     # WGL_ARB_extensions_string
-    WglFunction(Const(String), "wglGetExtensionsStringARB", [(HDC, "hdc")]),
+    WglFunction(Const(String), "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False),
     # WGL_ARB_pbuffer
     WglFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Pointer(Const(Int)), "piAttribList")]), 
-    WglFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")]),
+    WglFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")], sideeffects=False),
     WglFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]),
     WglFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]), 
-    WglFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iAttribute"), (Pointer(Int), "piValue")]),
+    WglFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iAttribute"), Out(Pointer(Int), "piValue")]),
     # WGL_ARB_pixel_format
-    WglFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(Int), "piValues")]),
-    WglFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(FLOAT), "pfValues")]),
-    WglFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), (Pointer(Int), "piFormats"), (Pointer(UINT), "nNumFormats")]),
+    WglFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
+    WglFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
+    WglFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "nMaxFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
     # WGL_EXT_extensions_string
-    WglFunction(Const(String), "wglGetExtensionsStringEXT", []),
+    WglFunction(Const(String), "wglGetExtensionsStringEXT", [], sideeffects=False),
     # WGL_EXT_pixel_format
-    WglFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(Int), "piValues")]),
-    WglFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(FLOAT), "pfValues")]),
-    WglFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), (Pointer(Int), "piFormats"), (Pointer(UINT), "nNumFormats")]),
+    WglFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
+    WglFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
+    WglFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "nMaxFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
 ]
 
 if __name__ == '__main__':
@@ -1056,8 +281,28 @@ if __name__ == '__main__':
     print '#include "glext.h"'
     print '#include "wglext.h"'
     print
+    print '#include "glhelpers.hpp"'
     print '#include "log.hpp"'
     print
+    print '#ifndef PFD_SUPPORT_DIRECTDRAW'
+    print '#define PFD_SUPPORT_DIRECTDRAW 0x00002000'
+    print '#endif'
+    print '#ifndef PFD_SUPPORT_COMPOSITION'
+    print '#define PFD_SUPPORT_COMPOSITION 0x00008000'
+    print '#endif'
+    print
+    print '#ifdef __MINGW32__'
+    print ''
+    print 'typedef struct _WGLSWAP'
+    print '{'
+    print '    HDC hdc;'
+    print '    UINT uiFlags;'
+    print '} WGLSWAP, *PWGLSWAP, FAR *LPWGLSWAP;'
+    print ''
+    print '#define WGL_SWAPMULTIPLE_MAX 16'
+    print ''
+    print '#endif'
+    print
     print 'extern "C" {'
     print
     wrap()