From 3c2c929d4c92b63818115a6b4a48334ea661863e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 4 May 2009 12:16:30 +0100 Subject: [PATCH] Factor out function wrapping. --- base.py | 57 ++++ d3d8.py | 2 +- d3d9.py | 4 +- d3dcaps.py | 4 +- ddraw.py | 14 +- opengl32.py | 866 ++++++++++++++++++++++++++-------------------------- windows.py | 70 ++--- 7 files changed, 523 insertions(+), 494 deletions(-) diff --git a/base.py b/base.py index 1f8f1ee..a901aeb 100644 --- a/base.py +++ b/base.py @@ -271,6 +271,63 @@ class Function: s += ")" return s + def pointer_type(self): + return 'P' + self.name + + def pointer_value(self): + return 'p' + self.name + + def wrap_decl(self): + ptype = self.pointer_type() + pvalue = self.pointer_value() + print 'typedef ' + self.prototype('* %s' % ptype) + ';' + print 'static %s %s = NULL;' % (ptype, pvalue) + print + + def get_true_pointer(self): + raise NotImplementedError + + def fail_impl(self): + if self.fail is not None: + assert self.type is not Void + print ' return %s;' % self.fail + else: + print ' ExitProcess(0);' + + def wrap_impl(self): + pvalue = self.pointer_value() + print self.prototype() + ' {' + if self.type is Void: + result = '' + else: + print ' %s result;' % self.type + result = 'result = ' + self.get_true_pointer() + print ' Log::BeginCall("%s");' % (self.name) + for type, name in self.args: + if not type.isoutput(): + type.unwrap_instance(name) + print ' Log::BeginArg("%s", "%s");' % (type, name) + type.dump(name) + print ' Log::EndArg();' + print ' %s%s(%s);' % (result, pvalue, ', '.join([str(name) for type, name in self.args])) + for type, name in self.args: + if type.isoutput(): + print ' Log::BeginArg("%s", "%s");' % (type, name) + type.dump(name) + print ' Log::EndArg();' + type.wrap_instance(name) + if self.type is not Void: + print ' Log::BeginReturn("%s");' % self.type + self.type.dump("result") + print ' Log::EndReturn();' + self.type.wrap_instance('result') + print ' Log::EndCall();' + if self.type is not Void: + print ' return result;' + print '}' + print + class Interface(Type): diff --git a/d3d8.py b/d3d8.py index 007212f..bc38163 100644 --- a/d3d8.py +++ b/d3d8.py @@ -269,7 +269,7 @@ IDirect3DVolume8.methods += [ d3d8 = Dll("d3d8") d3d8.functions += [ - Function(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]), + DllFunction(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]), ] if __name__ == '__main__': diff --git a/d3d9.py b/d3d9.py index 152d485..2473a09 100644 --- a/d3d9.py +++ b/d3d9.py @@ -383,8 +383,8 @@ IDirect3DSwapChain9Ex.methods += [ d3d9 = Dll("d3d9") d3d9.functions += [ - Function(PDIRECT3D9, "Direct3DCreate9", [(UINT, "SDKVersion")], fail='NULL'), - Function(HRESULT, "Direct3DCreate9Ex", [(UINT, "SDKVersion"), (OutPointer(PDIRECT3D9EX), "ppD3D")], fail='D3DERR_NOTAVAILABLE'), + DllFunction(PDIRECT3D9, "Direct3DCreate9", [(UINT, "SDKVersion")], fail='NULL'), + DllFunction(HRESULT, "Direct3DCreate9Ex", [(UINT, "SDKVersion"), (OutPointer(PDIRECT3D9EX), "ppD3D")], fail='D3DERR_NOTAVAILABLE'), ] if __name__ == '__main__': diff --git a/d3dcaps.py b/d3dcaps.py index 95afa18..5033915 100755 --- a/d3dcaps.py +++ b/d3dcaps.py @@ -455,6 +455,6 @@ D3DFINDDEVICERESULT = Struct("D3DFINDDEVICERESULT", [ ]) LPD3DFINDDEVICERESULT = Pointer(D3DFINDDEVICERESULT) -LPD3DENUMDEVICESCALLBACK = Function(HRESULT, "LPD3DENUMDEVICESCALLBACK", [(Pointer(GUID), "lpGuid"), (LPSTR, "lpDeviceDescription"), (LPSTR, "lpDeviceName"), LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID]) -LPD3DENUMDEVICESCALLBACK7 = Function(HRESULT, "LPD3DENUMDEVICESCALLBACK7", [(LPSTR, "lpDeviceDescription"), (LPSTR, "lpDeviceName"), LPD3DDEVICEDESC7, LPVOID]) +LPD3DENUMDEVICESCALLBACK = DllFunction(HRESULT, "LPD3DENUMDEVICESCALLBACK", [(Pointer(GUID), "lpGuid"), (LPSTR, "lpDeviceDescription"), (LPSTR, "lpDeviceName"), LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID]) +LPD3DENUMDEVICESCALLBACK7 = DllFunction(HRESULT, "LPD3DENUMDEVICESCALLBACK7", [(LPSTR, "lpDeviceDescription"), (LPSTR, "lpDeviceName"), LPD3DDEVICEDESC7, LPVOID]) diff --git a/ddraw.py b/ddraw.py index 2e5187b..a3e6760 100755 --- a/ddraw.py +++ b/ddraw.py @@ -1603,13 +1603,13 @@ DDCREATE = Flags(DWORD, [ ddraw = Dll("ddraw") ddraw.functions += [ - Function(HRESULT, "DirectDrawEnumerateW", [(LPDDENUMCALLBACKW, "lpCallback"), (LPVOID, "lpContext")]), - Function(HRESULT, "DirectDrawEnumerateA", [(LPDDENUMCALLBACKA, "lpCallback"), (LPVOID, "lpContext")]), - Function(HRESULT, "DirectDrawEnumerateExW", [(LPDDENUMCALLBACKEXW, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]), - Function(HRESULT, "DirectDrawEnumerateExA", [(LPDDENUMCALLBACKEXA, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]), - Function(HRESULT, "DirectDrawCreate", [(Pointer(GUID), "lpGUID"), (OutPointer(LPDIRECTDRAW), "lplpDD"), (Pointer(IUnknown), "pUnkOuter")]), - Function(HRESULT, "DirectDrawCreateEx", [(Pointer(GUID), "lpGuid"), (OutPointer(LPVOID), "lplpDD"), (REFIID, "iid"), (Pointer(IUnknown), "pUnkOuter")]), - Function(HRESULT, "DirectDrawCreateClipper", [(DWORD, "dwFlags"), (OutPointer(LPDIRECTDRAWCLIPPER), "lplpDDClipper"), (Pointer(IUnknown), "pUnkOuter")]), + DllFunction(HRESULT, "DirectDrawEnumerateW", [(LPDDENUMCALLBACKW, "lpCallback"), (LPVOID, "lpContext")]), + DllFunction(HRESULT, "DirectDrawEnumerateA", [(LPDDENUMCALLBACKA, "lpCallback"), (LPVOID, "lpContext")]), + DllFunction(HRESULT, "DirectDrawEnumerateExW", [(LPDDENUMCALLBACKEXW, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]), + DllFunction(HRESULT, "DirectDrawEnumerateExA", [(LPDDENUMCALLBACKEXA, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")]), + DllFunction(HRESULT, "DirectDrawCreate", [(Pointer(GUID), "lpGUID"), (OutPointer(LPDIRECTDRAW), "lplpDD"), (Pointer(IUnknown), "pUnkOuter")]), + DllFunction(HRESULT, "DirectDrawCreateEx", [(Pointer(GUID), "lpGuid"), (OutPointer(LPVOID), "lplpDD"), (REFIID, "iid"), (Pointer(IUnknown), "pUnkOuter")]), + DllFunction(HRESULT, "DirectDrawCreateClipper", [(DWORD, "dwFlags"), (OutPointer(LPDIRECTDRAWCLIPPER), "lplpDDClipper"), (Pointer(IUnknown), "pUnkOuter")]), ] if __name__ == '__main__': diff --git a/opengl32.py b/opengl32.py index ca148ac..539d466 100644 --- a/opengl32.py +++ b/opengl32.py @@ -22,414 +22,414 @@ from windows import * opengl32 = Dll("opengl32") opengl32.functions += [ - Function(Void, "glNewList", [(GLuint, "list"), (GLenum, "mode")]), - Function(Void, "glEndList", []), - Function(Void, "glCallList", [(GLuint, "list")]), - Function(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Pointer(Const(GLvoid)), "lists")]), - Function(Void, "glDeleteLists", [(GLuint, "list"), (GLsizei, "range")]), - Function(GLuint, "glGenLists", [(GLsizei, "range")]), - Function(Void, "glListBase", [(GLuint, "base")]), - Function(Void, "glBegin", [(GLprimenum, "mode")]), - Function(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Pointer(Const(GLubyte)), "bitmap")]), - Function(Void, "glColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]), - Function(Void, "glColor3bv", [(Pointer(Const(GLbyte)), "v")]), - Function(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]), - Function(Void, "glColor3dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]), - Function(Void, "glColor3fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]), - Function(Void, "glColor3iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]), - Function(Void, "glColor3sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]), - Function(Void, "glColor3ubv", [(Pointer(Const(GLubyte)), "v")]), - Function(Void, "glColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]), - Function(Void, "glColor3uiv", [(Pointer(Const(GLuint)), "v")]), - Function(Void, "glColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]), - Function(Void, "glColor3usv", [(Pointer(Const(GLushort)), "v")]), - Function(Void, "glColor4b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue"), (GLbyte, "alpha")]), - Function(Void, "glColor4bv", [(Pointer(Const(GLbyte)), "v")]), - Function(Void, "glColor4d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue"), (GLdouble, "alpha")]), - Function(Void, "glColor4dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glColor4f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]), - Function(Void, "glColor4fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glColor4i", [(GLint, "red"), (GLint, "green"), (GLint, "blue"), (GLint, "alpha")]), - Function(Void, "glColor4iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glColor4s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue"), (GLshort, "alpha")]), - Function(Void, "glColor4sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glColor4ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue"), (GLubyte, "alpha")]), - Function(Void, "glColor4ubv", [(Pointer(Const(GLubyte)), "v")]), - Function(Void, "glColor4ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue"), (GLuint, "alpha")]), - Function(Void, "glColor4uiv", [(Pointer(Const(GLuint)), "v")]), - Function(Void, "glColor4us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue"), (GLushort, "alpha")]), - Function(Void, "glColor4usv", [(Pointer(Const(GLushort)), "v")]), - Function(Void, "glEdgeFlag", [(GLboolean, "flag")]), - Function(Void, "glEdgeFlagv", [(Pointer(Const(GLboolean)), "flag")]), - Function(Void, "glEnd", []), - Function(Void, "glIndexd", [(GLdouble, "c")]), - Function(Void, "glIndexdv", [(Pointer(Const(GLdouble)), "c")]), - Function(Void, "glIndexf", [(GLfloat, "c")]), - Function(Void, "glIndexfv", [(Pointer(Const(GLfloat)), "c")]), - Function(Void, "glIndexi", [(GLint, "c")]), - Function(Void, "glIndexiv", [(Pointer(Const(GLint)), "c")]), - Function(Void, "glIndexs", [(GLshort, "c")]), - Function(Void, "glIndexsv", [(Pointer(Const(GLshort)), "c")]), - Function(Void, "glNormal3b", [(GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]), - Function(Void, "glNormal3bv", [(Pointer(Const(GLbyte)), "v")]), - Function(Void, "glNormal3d", [(GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]), - Function(Void, "glNormal3dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glNormal3f", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]), - Function(Void, "glNormal3fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glNormal3i", [(GLint, "nx"), (GLint, "ny"), (GLint, "nz")]), - Function(Void, "glNormal3iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glNormal3s", [(GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]), - Function(Void, "glNormal3sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glRasterPos2d", [(GLdouble, "x"), (GLdouble, "y")]), - Function(Void, "glRasterPos2dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glRasterPos2f", [(GLfloat, "x"), (GLfloat, "y")]), - Function(Void, "glRasterPos2fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glRasterPos2i", [(GLint, "x"), (GLint, "y")]), - Function(Void, "glRasterPos2iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glRasterPos2s", [(GLshort, "x"), (GLshort, "y")]), - Function(Void, "glRasterPos2sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glRasterPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]), - Function(Void, "glRasterPos3dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glRasterPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]), - Function(Void, "glRasterPos3fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glRasterPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]), - Function(Void, "glRasterPos3iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glRasterPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]), - Function(Void, "glRasterPos3sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glRasterPos4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]), - Function(Void, "glRasterPos4dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glRasterPos4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]), - Function(Void, "glRasterPos4fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glRasterPos4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]), - Function(Void, "glRasterPos4iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glRasterPos4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]), - Function(Void, "glRasterPos4sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glRectd", [(GLdouble, "x1"), (GLdouble, "y1"), (GLdouble, "x2"), (GLdouble, "y2")]), - Function(Void, "glRectdv", [(Pointer(Const(GLdouble)), "v1"), (Pointer(Const(GLdouble)), "v2")]), - Function(Void, "glRectf", [(GLfloat, "x1"), (GLfloat, "y1"), (GLfloat, "x2"), (GLfloat, "y2")]), - Function(Void, "glRectfv", [(Pointer(Const(GLfloat)), "v1"), (Pointer(Const(GLfloat)), "v2")]), - Function(Void, "glRecti", [(GLint, "x1"), (GLint, "y1"), (GLint, "x2"), (GLint, "y2")]), - Function(Void, "glRectiv", [(Pointer(Const(GLint)), "v1"), (Pointer(Const(GLint)), "v2")]), - Function(Void, "glRects", [(GLshort, "x1"), (GLshort, "y1"), (GLshort, "x2"), (GLshort, "y2")]), - Function(Void, "glRectsv", [(Pointer(Const(GLshort)), "v1"), (Pointer(Const(GLshort)), "v2")]), - Function(Void, "glTexCoord1d", [(GLdouble, "s")]), - Function(Void, "glTexCoord1dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glTexCoord1f", [(GLfloat, "s")]), - Function(Void, "glTexCoord1fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glTexCoord1i", [(GLint, "s")]), - Function(Void, "glTexCoord1iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glTexCoord1s", [(GLshort, "s")]), - Function(Void, "glTexCoord1sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glTexCoord2d", [(GLdouble, "s"), (GLdouble, "t")]), - Function(Void, "glTexCoord2dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glTexCoord2f", [(GLfloat, "s"), (GLfloat, "t")]), - Function(Void, "glTexCoord2fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glTexCoord2i", [(GLint, "s"), (GLint, "t")]), - Function(Void, "glTexCoord2iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glTexCoord2s", [(GLshort, "s"), (GLshort, "t")]), - Function(Void, "glTexCoord2sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glTexCoord3d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]), - Function(Void, "glTexCoord3dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glTexCoord3f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]), - Function(Void, "glTexCoord3fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glTexCoord3i", [(GLint, "s"), (GLint, "t"), (GLint, "r")]), - Function(Void, "glTexCoord3iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glTexCoord3s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r")]), - Function(Void, "glTexCoord3sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glTexCoord4d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]), - Function(Void, "glTexCoord4dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glTexCoord4f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]), - Function(Void, "glTexCoord4fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glTexCoord4i", [(GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]), - Function(Void, "glTexCoord4iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glTexCoord4s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]), - Function(Void, "glTexCoord4sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glVertex2d", [(GLdouble, "x"), (GLdouble, "y")]), - Function(Void, "glVertex2dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glVertex2f", [(GLfloat, "x"), (GLfloat, "y")]), - Function(Void, "glVertex2fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glVertex2i", [(GLint, "x"), (GLint, "y")]), - Function(Void, "glVertex2iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glVertex2s", [(GLshort, "x"), (GLshort, "y")]), - Function(Void, "glVertex2sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glVertex3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]), - Function(Void, "glVertex3dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glVertex3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]), - Function(Void, "glVertex3fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glVertex3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]), - Function(Void, "glVertex3iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glVertex3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]), - Function(Void, "glVertex3sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glVertex4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]), - Function(Void, "glVertex4dv", [(Pointer(Const(GLdouble)), "v")]), - Function(Void, "glVertex4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]), - Function(Void, "glVertex4fv", [(Pointer(Const(GLfloat)), "v")]), - Function(Void, "glVertex4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]), - Function(Void, "glVertex4iv", [(Pointer(Const(GLint)), "v")]), - Function(Void, "glVertex4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]), - Function(Void, "glVertex4sv", [(Pointer(Const(GLshort)), "v")]), - Function(Void, "glClipPlane", [(GLenum, "plane"), (Pointer(Const(GLdouble)), "equation")]), - Function(Void, "glColorMaterial", [(GLenum, "face"), (GLenum, "mode")]), - Function(Void, "glCullFace", [(GLenum, "mode")]), - Function(Void, "glFogf", [(GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glFogfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glFogi", [(GLenum, "pname"), (GLint, "param")]), - Function(Void, "glFogiv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glFrontFace", [(GLenum, "mode")]), - Function(Void, "glHint", [(GLenum, "target"), (GLenum, "mode")]), - Function(Void, "glLightf", [(GLenum, "light"), (GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glLightfv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glLighti", [(GLenum, "light"), (GLenum, "pname"), (GLint, "param")]), - Function(Void, "glLightiv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glLightModelf", [(GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glLightModelfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glLightModeli", [(GLenum, "pname"), (GLint, "param")]), - Function(Void, "glLightModeliv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glLineStipple", [(GLint, "factor"), (GLushort, "pattern")]), - Function(Void, "glLineWidth", [(GLfloat, "width")]), - Function(Void, "glMaterialf", [(GLenum, "face"), (GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glMateriali", [(GLenum, "face"), (GLenum, "pname"), (GLint, "param")]), - Function(Void, "glMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glPointSize", [(GLfloat, "size")]), - Function(Void, "glPolygonMode", [(GLenum, "face"), (GLenum, "mode")]), - Function(Void, "glPolygonStipple", [(Pointer(Const(GLubyte)), "mask")]), - Function(Void, "glScissor", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), - Function(Void, "glShadeModel", [(GLenum, "mode")]), - Function(Void, "glTexParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glTexParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]), - Function(Void, "glTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(Void, "glTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(Void, "glTexEnvf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glTexEnvi", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]), - Function(Void, "glTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glTexGend", [(GLenum, "coord"), (GLenum, "pname"), (GLdouble, "param")]), - Function(Void, "glTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLdouble)), "params")]), - Function(Void, "glTexGenf", [(GLenum, "coord"), (GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glTexGeni", [(GLenum, "coord"), (GLenum, "pname"), (GLint, "param")]), - Function(Void, "glTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glFeedbackBuffer", [(GLsizei, "size"), (GLenum, "type"), (OutPointer(GLfloat), "buffer")]), - Function(Void, "glSelectBuffer", [(GLsizei, "size"), (OutPointer(GLuint), "buffer")]), - Function(GLint, "glRenderMode", [(GLenum, "mode")]), - Function(Void, "glInitNames", []), - Function(Void, "glLoadName", [(GLuint, "name")]), - Function(Void, "glPassThrough", [(GLfloat, "token")]), - Function(Void, "glPopName", []), - Function(Void, "glPushName", [(GLuint, "name")]), - Function(Void, "glDrawBuffer", [(GLenum, "mode")]), - Function(Void, "glClear", [(GLbufferbitfield, "mask")]), - Function(Void, "glClearAccum", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]), - Function(Void, "glClearIndex", [(GLfloat, "c")]), - Function(Void, "glClearColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]), - Function(Void, "glClearStencil", [(GLint, "s")]), - Function(Void, "glClearDepth", [(GLclampd, "depth")]), - Function(Void, "glStencilMask", [(GLuint, "mask")]), - Function(Void, "glColorMask", [(GLboolean, "red"), (GLboolean, "green"), (GLboolean, "blue"), (GLboolean, "alpha")]), - Function(Void, "glDepthMask", [(GLboolean, "flag")]), - Function(Void, "glIndexMask", [(GLuint, "mask")]), - Function(Void, "glAccum", [(GLenum, "op"), (GLfloat, "value")]), - Function(Void, "glDisable", [(GLenum, "cap")]), - Function(Void, "glEnable", [(GLenum, "cap")]), - Function(Void, "glFinish", []), - Function(Void, "glFlush", []), - Function(Void, "glPopAttrib", []), - Function(Void, "glPushAttrib", [(GLbitfield, "mask")]), - Function(Void, "glMap1d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLdouble)), "points")]), - Function(Void, "glMap1f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLfloat)), "points")]), - Function(Void, "glMap2d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLdouble, "v1"), (GLdouble, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLdouble)), "points")]), - Function(Void, "glMap2f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLfloat, "v1"), (GLfloat, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLfloat)), "points")]), - Function(Void, "glMapGrid1d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2")]), - Function(Void, "glMapGrid1f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2")]), - Function(Void, "glMapGrid2d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "vn"), (GLdouble, "v1"), (GLdouble, "v2")]), - Function(Void, "glMapGrid2f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "vn"), (GLfloat, "v1"), (GLfloat, "v2")]), - Function(Void, "glEvalCoord1d", [(GLdouble, "u")]), - Function(Void, "glEvalCoord1dv", [(Pointer(Const(GLdouble)), "u")]), - Function(Void, "glEvalCoord1f", [(GLfloat, "u")]), - Function(Void, "glEvalCoord1fv", [(Pointer(Const(GLfloat)), "u")]), - Function(Void, "glEvalCoord2d", [(GLdouble, "u"), (GLdouble, "v")]), - Function(Void, "glEvalCoord2dv", [(Pointer(Const(GLdouble)), "u")]), - Function(Void, "glEvalCoord2f", [(GLfloat, "u"), (GLfloat, "v")]), - Function(Void, "glEvalCoord2fv", [(Pointer(Const(GLfloat)), "u")]), - Function(Void, "glEvalMesh1", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2")]), - Function(Void, "glEvalPoint1", [(GLint, "i")]), - Function(Void, "glEvalMesh2", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2"), (GLint, "j1"), (GLint, "j2")]), - Function(Void, "glEvalPoint2", [(GLint, "i"), (GLint, "j")]), - Function(Void, "glAlphaFunc", [(GLenum, "func"), (GLclampf, "ref")]), - Function(Void, "glBlendFunc", [(GLenum, "sfactor"), (GLenum, "dfactor")]), - Function(Void, "glLogicOp", [(GLenum, "opcode")]), - Function(Void, "glStencilFunc", [(GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]), - Function(Void, "glStencilOp", [(GLenum, "fail"), (GLenum, "zfail"), (GLenum, "zpass")]), - Function(Void, "glDepthFunc", [(GLenum, "func")]), - Function(Void, "glPixelZoom", [(GLfloat, "xfactor"), (GLfloat, "yfactor")]), - Function(Void, "glPixelTransferf", [(GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glPixelTransferi", [(GLenum, "pname"), (GLint, "param")]), - Function(Void, "glPixelStoref", [(GLenum, "pname"), (GLfloat, "param")]), - Function(Void, "glPixelStorei", [(GLenum, "pname"), (GLint, "param")]), - Function(Void, "glPixelMapfv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLfloat)), "values")]), - Function(Void, "glPixelMapuiv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLuint)), "values")]), - Function(Void, "glPixelMapusv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLushort)), "values")]), - Function(Void, "glReadBuffer", [(GLenum, "mode")]), - Function(Void, "glCopyPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "type")]), - Function(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]), - Function(Void, "glDrawPixels", [(GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(Void, "glGetBooleanv", [(GLenum, "pname"), (OutPointer(GLboolean), "params")]), - Function(Void, "glGetClipPlane", [(GLenum, "plane"), (OutPointer(GLdouble), "equation")]), - Function(Void, "glGetDoublev", [(GLenum, "pname"), (OutPointer(GLdouble), "params")]), - Function(GLenum, "glGetError", []), - Function(Void, "glGetFloatv", [(GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetIntegerv", [(GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetLightfv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetLightiv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetMapdv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLdouble), "v")]), - Function(Void, "glGetMapfv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLfloat), "v")]), - Function(Void, "glGetMapiv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLint), "v")]), - Function(Void, "glGetMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetPixelMapfv", [(GLenum, "map"), (OutPointer(GLfloat), "values")]), - Function(Void, "glGetPixelMapuiv", [(GLenum, "map"), (OutPointer(GLuint), "values")]), - Function(Void, "glGetPixelMapusv", [(GLenum, "map"), (OutPointer(GLushort), "values")]), - Function(Void, "glGetPolygonStipple", [(OutPointer(GLubyte), "mask")]), - Function(Alias("const GLubyte *", String), "glGetString", [(GLenum, "name")]), - Function(Void, "glGetTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]), - Function(Void, "glGetTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]), - Function(Void, "glGetTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(Void, "glGetTexLevelParameterfv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), - Function(Void, "glGetTexLevelParameteriv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLint), "params")]), - Function(GLboolean, "glIsEnabled", [(GLenum, "cap")]), - Function(GLboolean, "glIsList", [(GLuint, "list")]), - Function(Void, "glDepthRange", [(GLclampd, "zNear"), (GLclampd, "zFar")]), - Function(Void, "glFrustum", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]), - Function(Void, "glLoadIdentity", []), - Function(Void, "glLoadMatrixf", [(Pointer(Const(GLfloat)), "m")]), - Function(Void, "glLoadMatrixd", [(Pointer(Const(GLdouble)), "m")]), - Function(Void, "glMatrixMode", [(GLenum, "mode")]), - Function(Void, "glMultMatrixf", [(Pointer(Const(GLfloat)), "m")]), - Function(Void, "glMultMatrixd", [(Pointer(Const(GLdouble)), "m")]), - Function(Void, "glOrtho", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]), - Function(Void, "glPopMatrix", []), - Function(Void, "glPushMatrix", []), - Function(Void, "glRotated", [(GLdouble, "angle"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]), - Function(Void, "glRotatef", [(GLfloat, "angle"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]), - Function(Void, "glScaled", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]), - Function(Void, "glScalef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]), - Function(Void, "glTranslated", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]), - Function(Void, "glTranslatef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]), - Function(Void, "glViewport", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), - Function(Void, "glArrayElement", [(GLint, "i")]), - Function(Void, "glBindTexture", [(GLenum, "target"), (GLuint, "texture")]), - Function(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glDisableClientState", [(GLenum, "array")]), - Function(Void, "glDrawArrays", [(GLenum, "mode"), (GLint, "first"), (GLsizei, "count")]), - Function(Void, "glDrawElements", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]), - Function(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glEnableClientState", [(GLenum, "array")]), - Function(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glIndexub", [(GLubyte, "c")]), - Function(Void, "glIndexubv", [(Pointer(Const(GLubyte)), "c")]), - Function(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]), - Function(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]), - Function(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (Pointer(GLboolean), "residences")]), - Function(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]), - Function(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]), - Function(Void, "glCopyTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]), - Function(Void, "glCopyTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), - Function(Void, "glDeleteTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures")]), - Function(Void, "glGenTextures", [(GLsizei, "n"), (Pointer(GLuint), "textures")]), - Function(Void, "glGetPointerv", [(GLenum, "pname"), (Pointer(Pointer(GLvoid)), "params")]), - Function(GLboolean, "glIsTexture", [(GLuint, "texture")]), - Function(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (Pointer(Const(GLclampf)), "priorities")]), - Function(Void, "glTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(Void, "glTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(Void, "glPopClientAttrib", []), - Function(Void, "glPushClientAttrib", [(GLbitfield, "mask")]), - Function(Void, "glBlendColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]), - Function(Void, "glBlendEquation", [(GLenum, "mode")]), - Function(Void, "glDrawRangeElements", [(GLenum, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]), - Function(Void, "glColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "table")]), - Function(Void, "glColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glCopyColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]), - Function(Void, "glGetColorTable", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "table")]), - Function(Void, "glGetColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), - Function(Void, "glGetColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), - Function(Void, "glColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLsizei, "count"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "data")]), - Function(Void, "glCopyColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]), - Function(Void, "glConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]), - Function(Void, "glConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]), - Function(Void, "glConvolutionParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "params")]), - Function(Void, "glConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]), - Function(Void, "glConvolutionParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "params")]), - Function(Void, "glConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]), - Function(Void, "glCopyConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]), - Function(Void, "glCopyConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), - Function(Void, "glGetConvolutionFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "image")]), - Function(Void, "glGetConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), - Function(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), - Function(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "row"), (Pointer(GLvoid), "column"), (Pointer(GLvoid), "span")]), - Function(Void, "glSeparableFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "row"), (Pointer(Const(GLvoid)), "column")]), - Function(Void, "glGetHistogram", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]), - Function(Void, "glGetHistogramParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), - Function(Void, "glGetHistogramParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), - Function(Void, "glGetMinmax", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]), - Function(Void, "glGetMinmaxParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), - Function(Void, "glGetMinmaxParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), - Function(Void, "glHistogram", [(GLenum, "target"), (GLsizei, "width"), (GLenum, "internalformat"), (GLboolean, "sink")]), - Function(Void, "glMinmax", [(GLenum, "target"), (GLenum, "internalformat"), (GLboolean, "sink")]), - Function(Void, "glResetHistogram", [(GLenum, "target")]), - Function(Void, "glResetMinmax", [(GLenum, "target")]), - Function(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]), - Function(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")]), - Function(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), - Function(Void, "glActiveTextureARB", [(GLenum, "texture")]), - Function(Void, "glClientActiveTextureARB", [(GLenum, "texture")]), - Function(Void, "glMultiTexCoord1dARB", [(GLenum, "target"), (GLdouble, "s")]), - Function(Void, "glMultiTexCoord1dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]), - Function(Void, "glMultiTexCoord1fARB", [(GLenum, "target"), (GLfloat, "s")]), - Function(Void, "glMultiTexCoord1fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]), - Function(Void, "glMultiTexCoord1iARB", [(GLenum, "target"), (GLint, "s")]), - Function(Void, "glMultiTexCoord1ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]), - Function(Void, "glMultiTexCoord1sARB", [(GLenum, "target"), (GLshort, "s")]), - Function(Void, "glMultiTexCoord1svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]), - Function(Void, "glMultiTexCoord2dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]), - Function(Void, "glMultiTexCoord2dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]), - Function(Void, "glMultiTexCoord2fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]), - Function(Void, "glMultiTexCoord2fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]), - Function(Void, "glMultiTexCoord2iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]), - Function(Void, "glMultiTexCoord2ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]), - Function(Void, "glMultiTexCoord2sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]), - Function(Void, "glMultiTexCoord2svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]), - Function(Void, "glMultiTexCoord3dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]), - Function(Void, "glMultiTexCoord3dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]), - Function(Void, "glMultiTexCoord3fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]), - Function(Void, "glMultiTexCoord3fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]), - Function(Void, "glMultiTexCoord3iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]), - Function(Void, "glMultiTexCoord3ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]), - Function(Void, "glMultiTexCoord3sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]), - Function(Void, "glMultiTexCoord3svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]), - Function(Void, "glMultiTexCoord4dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]), - Function(Void, "glMultiTexCoord4dvARB", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]), - Function(Void, "glMultiTexCoord4fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]), - Function(Void, "glMultiTexCoord4fvARB", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]), - Function(Void, "glMultiTexCoord4iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]), - Function(Void, "glMultiTexCoord4ivARB", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]), - Function(Void, "glMultiTexCoord4sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]), - Function(Void, "glMultiTexCoord4svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]), + 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", [(Pointer(Const(GLfloat)), "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"), (Pointer(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"), (Pointer(GLuint), "textures")]), + DllFunction(Void, "glGetPointerv", [(GLenum, "pname"), (Pointer(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"), (Pointer(GLfloat), "params")]), + DllFunction(Void, "glGetColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(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"), (Pointer(GLfloat), "params")]), + DllFunction(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(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"), (Pointer(GLfloat), "params")]), + DllFunction(Void, "glGetHistogramParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), + DllFunction(Void, "glGetMinmax", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]), + DllFunction(Void, "glGetMinmaxParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), + DllFunction(Void, "glGetMinmaxParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(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")]), ] HGLRC = Alias("HGLRC", HANDLE) @@ -527,30 +527,30 @@ LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [ LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR) opengl32.functions += [ - Function(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]), - Function(HGLRC, "wglCreateContext", [(HDC, "hdc")]), - Function(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]), - Function(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]), - Function(HGLRC, "wglGetCurrentContext", []), - Function(HDC, "wglGetCurrentDC", []), - Function(PROC, "wglGetProcAddress", [(LPCSTR, "lpszProc")]), - Function(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")]), - Function(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), - Function(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), (OutPointer(PIXELFORMATDESCRIPTOR), "ppfd")]), - Function(Int, "wglGetPixelFormat", [(HDC, "hdc")]), - Function(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), - Function(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]), - Function(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]), - Function(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), - Function(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), - Function(BOOL, "wglSwapBuffers", [(HDC, "hdc")]), - Function(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]), - Function(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]), - Function(BOOL , "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), (OutPointer(LAYERPLANEDESCRIPTOR), "plpd")]), - Function(Int , "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Pointer(Const(COLORREF)), "pcr")]), - Function(Int , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (OutPointer(COLORREF), "pcr")]), - Function(BOOL , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]), - Function(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]), + 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, "wglGetProcAddress", [(LPCSTR, "lpszProc")]), + DllFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")]), + 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(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), + DllFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]), + DllFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]), + DllFunction(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), + DllFunction(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), + 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 , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]), + DllFunction(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]), ] if False: @@ -560,7 +560,7 @@ if False: ]) opengl32.functions += [ - Function(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]), + DllFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]), ] if __name__ == '__main__': diff --git a/windows.py b/windows.py index a149e6a..4db8616 100644 --- a/windows.py +++ b/windows.py @@ -137,6 +137,23 @@ IUnknown.methods = ( ) +class DllFunction(Function): + + def get_true_pointer(self): + ptype = self.pointer_type() + pvalue = self.pointer_value() + print ' if(!g_hDll) {' + print ' g_hDll = LoadLibrary(g_szDll);' + print ' if(!g_hDll)' + self.fail_impl() + print ' }' + print ' if(!%s) {' % (pvalue,) + print ' %s = (%s)GetProcAddress( g_hDll, "%s");' % (pvalue, ptype, self.name) + print ' if(!%s)' % (pvalue,) + self.fail_impl() + print ' }' + + class Dll: def __init__(self, name): @@ -157,6 +174,9 @@ class Dll: print print 'BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);' print + for function in self.functions: + function.wrap_decl() + print def wrap_impl(self): print r'BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {' @@ -184,54 +204,6 @@ class Dll: print r'}' print for function in self.functions: - type = 'P' + function.name - print function.prototype() + ' {' - if 0: - print ' Log::Close();' - print ' Log::Open("%s");' % self.name - #print ' Log::ReOpen();' - print ' typedef ' + function.prototype('* %s' % type) + ';' - print ' %s pFunction;' % type - if function.type is Void: - result = '' - else: - print ' %s result;' % function.type - result = 'result = ' - print ' if(!g_hDll) {' - print ' g_hDll = LoadLibrary(g_szDll);' - print ' if(!g_hDll)' - print ' ExitProcess(0);' - print ' }' - print ' pFunction = (%s)GetProcAddress( g_hDll, "%s");' % (type, function.name) - print ' if(!pFunction)' - if function.fail is not None: - assert function.type is not Void - print ' return %s;' % function.fail - else: - print ' ExitProcess(0);' - print ' Log::BeginCall("%s");' % (function.name) - for type, name in function.args: - if not type.isoutput(): - type.unwrap_instance(name) - print ' Log::BeginArg("%s", "%s");' % (type, name) - type.dump(name) - print ' Log::EndArg();' - print ' %spFunction(%s);' % (result, ', '.join([str(name) for type, name in function.args])) - for type, name in function.args: - if type.isoutput(): - print ' Log::BeginArg("%s", "%s");' % (type, name) - type.dump(name) - print ' Log::EndArg();' - type.wrap_instance(name) - if function.type is not Void: - print ' Log::BeginReturn("%s");' % function.type - function.type.dump("result") - print ' Log::EndReturn();' - function.type.wrap_instance('result') - print ' Log::EndCall();' - if function.type is not Void: - print ' return result;' - print '}' - print + function.wrap_impl() print -- 2.45.2