[med-svn] r951 - in trunk/packages/mgltools/opengltk/trunk: . debian opengltk opengltk/extent

smoe-guest at alioth.debian.org smoe-guest at alioth.debian.org
Fri Dec 21 23:31:04 UTC 2007


Author: smoe-guest
Date: 2007-12-21 23:31:03 +0000 (Fri, 21 Dec 2007)
New Revision: 951

Added:
   trunk/packages/mgltools/opengltk/trunk/debian/
   trunk/packages/mgltools/opengltk/trunk/debian/changelog
   trunk/packages/mgltools/opengltk/trunk/debian/compat
   trunk/packages/mgltools/opengltk/trunk/debian/control
   trunk/packages/mgltools/opengltk/trunk/debian/copyright
   trunk/packages/mgltools/opengltk/trunk/debian/pycompat
   trunk/packages/mgltools/opengltk/trunk/debian/rules
   trunk/packages/mgltools/opengltk/trunk/opengltk/
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gl_i.h
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib.py
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib_wrap.c
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glu_i.h
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib.py
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib_wrap.c
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glx_i.h
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib.py
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib_wrap.c
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib.py
   trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib_wrap.c
Log:
[svn-inject] Applying Debian modifications to trunk


Property changes on: trunk/packages/mgltools/opengltk/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Added: trunk/packages/mgltools/opengltk/trunk/debian/changelog
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/changelog	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/changelog	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,6 @@
+opengltk (1.5.0-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Steffen Moeller <moeller at debian.org>  Thu, 20 Dec 2007 16:27:31 +0100
+

Added: trunk/packages/mgltools/opengltk/trunk/debian/compat
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/compat	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/compat	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1 @@
+5

Added: trunk/packages/mgltools/opengltk/trunk/debian/control
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/control	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/control	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,16 @@
+Source: opengltk
+Section: non-free/science
+Priority: optional
+Maintainer: Steffen Moeller <moeller at debian.org>
+Build-Depends: debhelper (>= 5.0.38), python-central (>= 0.5.6), cdbs (>= 0.4.49), python-all-dev (>= 2.3.5-11), swig (>= 1.3.20), libglu1-mesa-dev
+Standards-Version: 3.7.2
+XS-Python-Version: 2.4,2.5
+Homepage: http://mgltools.scripps.edu/
+
+Package: mgltools-opengltk
+XB-Python-Version: ${python:Versions}
+Provides: ${python:Provides}
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: opengltk
+ The library is needed by mgltools-autodocktools at runtime.

Added: trunk/packages/mgltools/opengltk/trunk/debian/copyright
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/copyright	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/copyright	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,46 @@
+This package was debianized by Steffen Moeller <moeller at debian.org> on
+Thu, 20 Dec 2007 16:27:31 +0100.
+
+It was downloaded from http://mdltools.scripps.edu
+
+Upstream Authors: 
+
+    Molecular Graphics Laboratory <mgltools at scripps.edu>
+
+Copyright: 
+
+    THE SCRIPPS RESEARCH INSTITUTE, <sanner at scripps.edu>
+
+License:
+
+    PLEASE READ THIS DOCUMENT CAREFULLY. IF YOU AGREE WITH THE TERMS
+    AND CONDITIONS OF THIS LICENSE AGREEMENT, AND WISH TO RECEIVE AND
+    USE THIS SOFTWARE.
+
+    1. Grant Of Limited License; Software Use Restrictions. The programs
+       received by you will be used only for NON COMMERCIAL SCIENTIFIC
+       RESEARCH. This license is issued to you as an individual. For
+       institution wide use or commercial use of the software you will
+       have to follow the official registration procedure. To do so you can
+       contact us by e-mail (sanner at scripps.edu), by mail (Michel Sanner,
+       TSRI, Molecular Biology Department, MB5, 10666 North Torrey Pines
+       Road, 92037 La Jolla) or by fax (858) 784-2860.
+
+       Some of the components have their own licensing specificities
+       that are described in the README file that is generated when you
+       download the software. We request that you read the content of
+       this file and comply to the requirements.
+    2. Copying Restrictions. You will not sell or otherwise transfer these
+       programs or derivatives to any other party, whether with or
+       without consideration, for any purpose.
+    3. Ownership of Software. You will not obtain, and will not attempt to
+       obtain copyright coverage thereon without the express purpose
+       written consent of The Scripps Research Institute.
+    4. Limitation Of Liability. You will hold harmless from all or any expenses
+       you may incur as a result of or arising from your use, direct or indirect,
+       of these materials. You understand that no other right or license
+       to this program or its derivatives is granted or implied as a
+       result of our transmission of same to you.
+
+The Debian packaging is (C) 2007, Steffen Moeller <moeller at debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

Added: trunk/packages/mgltools/opengltk/trunk/debian/pycompat
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/pycompat	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/pycompat	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1 @@
+2

Added: trunk/packages/mgltools/opengltk/trunk/debian/rules
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/debian/rules	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/debian/rules	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,20 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+export DEB_PYTHON_SYSTEM=pycentral
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+#include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+clean::
+	find . -name CVS -a -type d| xargs -r rm -r
+	rm -rf build build-stamp debian/Pmv


Property changes on: trunk/packages/mgltools/opengltk/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gl_i.h
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gl_i.h	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gl_i.h	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,2252 @@
+/*
+ * Mesa 3-D graphics library
+ * Version:  7.0
+ *
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef __gl_h_
+#define __gl_h_
+
+#if defined(USE_MGL_NAMESPACE)
+#include "gl_mangle.h"
+#endif
+
+
+/**********************************************************************
+ * Begin system-specific stuff. Do not do any of this when building
+ * for SciTech SNAP, as this is all done before this header file is
+ * included. 
+ */
+#if !defined(__SCITECH_SNAP__)
+
+#if defined(__BEOS__)
+#include <stdlib.h>     /* to get some BeOS-isms */
+#endif
+
+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
+#define OPENSTEP
+#endif
+
+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
+#define __WIN32__
+#endif
+
+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
+#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
+#    define GLAPI __declspec(dllexport)
+#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+#    define GLAPI __declspec(dllimport)
+#  else /* for use with static link lib build of Win32 edition only */
+#    define GLAPI extern
+#  endif /* _STATIC_MESA support */
+#  define GLAPIENTRY __stdcall
+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
+#  define GLAPI extern
+#  define GLAPIENTRY __stdcall
+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#  define GLAPI __attribute__((visibility("default")))
+#  define GLAPIENTRY
+#endif /* WIN32 && !CYGWIN */
+
+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
+#  define PRAGMA_EXPORT_SUPPORTED		1
+#endif
+
+/*
+ * WINDOWS: Include windows.h here to define APIENTRY.
+ * It is also useful when applications include this file by
+ * including only glut.h, since glut.h depends on windows.h.
+ * Applications needing to include windows.h with parms other
+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
+ * glut.h or gl.h.
+ */
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) \
+     && !defined(OPENSTEP) && !defined(__CYGWIN__) || defined(__MINGW32__)
+#include <GL/mesa_wgl.h>
+#endif
+
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import on
+#endif
+
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY GLAPIENTRY
+#endif
+
+/* "P" suffix to be used for a pointer to a function */
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#ifdef CENTERLINE_CLPP
+#define signed
+#endif
+
+#if defined(PRAGMA_EXPORT_SUPPORTED)
+#pragma export on
+#endif
+
+#endif /* !__SCITECH_SNAP__ */
+/*
+ * End system-specific stuff.
+ **********************************************************************/
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define GL_VERSION_1_1   1
+#define GL_VERSION_1_2   1
+#define GL_VERSION_1_3   1
+#define GL_ARB_imaging   1
+
+
+/*
+ * Datatypes
+ */
+typedef unsigned int	GLenum;
+typedef unsigned char	GLboolean;
+typedef unsigned int	GLbitfield;
+typedef void		GLvoid;
+typedef signed char	GLbyte;		/* 1-byte signed */
+typedef short		GLshort;	/* 2-byte signed */
+typedef int		GLint;		/* 4-byte signed */
+typedef unsigned char	GLubyte;	/* 1-byte unsigned */
+typedef unsigned short	GLushort;	/* 2-byte unsigned */
+typedef unsigned int	GLuint;		/* 4-byte unsigned */
+typedef int		GLsizei;	/* 4-byte signed */
+typedef float		GLfloat;	/* single precision float */
+typedef float		GLclampf;	/* single precision float in [0,1] */
+typedef double		GLdouble;	/* double precision float */
+typedef double		GLclampd;	/* double precision float in [0,1] */
+
+
+
+/*
+ * Constants
+ */
+
+/* Boolean values */
+#define GL_FALSE				0x0
+#define GL_TRUE					0x1
+
+/* Data types */
+#define GL_BYTE					0x1400
+#define GL_UNSIGNED_BYTE			0x1401
+#define GL_SHORT				0x1402
+#define GL_UNSIGNED_SHORT			0x1403
+#define GL_INT					0x1404
+#define GL_UNSIGNED_INT				0x1405
+#define GL_FLOAT				0x1406
+#define GL_2_BYTES				0x1407
+#define GL_3_BYTES				0x1408
+#define GL_4_BYTES				0x1409
+#define GL_DOUBLE				0x140A
+
+/* Primitives */
+#define GL_POINTS				0x0000
+#define GL_LINES				0x0001
+#define GL_LINE_LOOP				0x0002
+#define GL_LINE_STRIP				0x0003
+#define GL_TRIANGLES				0x0004
+#define GL_TRIANGLE_STRIP			0x0005
+#define GL_TRIANGLE_FAN				0x0006
+#define GL_QUADS				0x0007
+#define GL_QUAD_STRIP				0x0008
+#define GL_POLYGON				0x0009
+
+/* Vertex Arrays */
+#define GL_VERTEX_ARRAY				0x8074
+#define GL_NORMAL_ARRAY				0x8075
+#define GL_COLOR_ARRAY				0x8076
+#define GL_INDEX_ARRAY				0x8077
+#define GL_TEXTURE_COORD_ARRAY			0x8078
+#define GL_EDGE_FLAG_ARRAY			0x8079
+#define GL_VERTEX_ARRAY_SIZE			0x807A
+#define GL_VERTEX_ARRAY_TYPE			0x807B
+#define GL_VERTEX_ARRAY_STRIDE			0x807C
+#define GL_NORMAL_ARRAY_TYPE			0x807E
+#define GL_NORMAL_ARRAY_STRIDE			0x807F
+#define GL_COLOR_ARRAY_SIZE			0x8081
+#define GL_COLOR_ARRAY_TYPE			0x8082
+#define GL_COLOR_ARRAY_STRIDE			0x8083
+#define GL_INDEX_ARRAY_TYPE			0x8085
+#define GL_INDEX_ARRAY_STRIDE			0x8086
+#define GL_TEXTURE_COORD_ARRAY_SIZE		0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE		0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE		0x808A
+#define GL_EDGE_FLAG_ARRAY_STRIDE		0x808C
+#define GL_VERTEX_ARRAY_POINTER			0x808E
+#define GL_NORMAL_ARRAY_POINTER			0x808F
+#define GL_COLOR_ARRAY_POINTER			0x8090
+#define GL_INDEX_ARRAY_POINTER			0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER		0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER		0x8093
+#define GL_V2F					0x2A20
+#define GL_V3F					0x2A21
+#define GL_C4UB_V2F				0x2A22
+#define GL_C4UB_V3F				0x2A23
+#define GL_C3F_V3F				0x2A24
+#define GL_N3F_V3F				0x2A25
+#define GL_C4F_N3F_V3F				0x2A26
+#define GL_T2F_V3F				0x2A27
+#define GL_T4F_V4F				0x2A28
+#define GL_T2F_C4UB_V3F				0x2A29
+#define GL_T2F_C3F_V3F				0x2A2A
+#define GL_T2F_N3F_V3F				0x2A2B
+#define GL_T2F_C4F_N3F_V3F			0x2A2C
+#define GL_T4F_C4F_N3F_V4F			0x2A2D
+
+/* Matrix Mode */
+#define GL_MATRIX_MODE				0x0BA0
+#define GL_MODELVIEW				0x1700
+#define GL_PROJECTION				0x1701
+#define GL_TEXTURE				0x1702
+
+/* Points */
+#define GL_POINT_SMOOTH				0x0B10
+#define GL_POINT_SIZE				0x0B11
+#define GL_POINT_SIZE_GRANULARITY 		0x0B13
+#define GL_POINT_SIZE_RANGE			0x0B12
+
+/* Lines */
+#define GL_LINE_SMOOTH				0x0B20
+#define GL_LINE_STIPPLE				0x0B24
+#define GL_LINE_STIPPLE_PATTERN			0x0B25
+#define GL_LINE_STIPPLE_REPEAT			0x0B26
+#define GL_LINE_WIDTH				0x0B21
+#define GL_LINE_WIDTH_GRANULARITY		0x0B23
+#define GL_LINE_WIDTH_RANGE			0x0B22
+
+/* Polygons */
+#define GL_POINT				0x1B00
+#define GL_LINE					0x1B01
+#define GL_FILL					0x1B02
+#define GL_CW					0x0900
+#define GL_CCW					0x0901
+#define GL_FRONT				0x0404
+#define GL_BACK					0x0405
+#define GL_POLYGON_MODE				0x0B40
+#define GL_POLYGON_SMOOTH			0x0B41
+#define GL_POLYGON_STIPPLE			0x0B42
+#define GL_EDGE_FLAG				0x0B43
+#define GL_CULL_FACE				0x0B44
+#define GL_CULL_FACE_MODE			0x0B45
+#define GL_FRONT_FACE				0x0B46
+#define GL_POLYGON_OFFSET_FACTOR		0x8038
+#define GL_POLYGON_OFFSET_UNITS			0x2A00
+#define GL_POLYGON_OFFSET_POINT			0x2A01
+#define GL_POLYGON_OFFSET_LINE			0x2A02
+#define GL_POLYGON_OFFSET_FILL			0x8037
+
+/* Display Lists */
+#define GL_COMPILE				0x1300
+#define GL_COMPILE_AND_EXECUTE			0x1301
+#define GL_LIST_BASE				0x0B32
+#define GL_LIST_INDEX				0x0B33
+#define GL_LIST_MODE				0x0B30
+
+/* Depth buffer */
+#define GL_NEVER				0x0200
+#define GL_LESS					0x0201
+#define GL_EQUAL				0x0202
+#define GL_LEQUAL				0x0203
+#define GL_GREATER				0x0204
+#define GL_NOTEQUAL				0x0205
+#define GL_GEQUAL				0x0206
+#define GL_ALWAYS				0x0207
+#define GL_DEPTH_TEST				0x0B71
+#define GL_DEPTH_BITS				0x0D56
+#define GL_DEPTH_CLEAR_VALUE			0x0B73
+#define GL_DEPTH_FUNC				0x0B74
+#define GL_DEPTH_RANGE				0x0B70
+#define GL_DEPTH_WRITEMASK			0x0B72
+#define GL_DEPTH_COMPONENT			0x1902
+
+/* Lighting */
+#define GL_LIGHTING				0x0B50
+#define GL_LIGHT0				0x4000
+#define GL_LIGHT1				0x4001
+#define GL_LIGHT2				0x4002
+#define GL_LIGHT3				0x4003
+#define GL_LIGHT4				0x4004
+#define GL_LIGHT5				0x4005
+#define GL_LIGHT6				0x4006
+#define GL_LIGHT7				0x4007
+#define GL_SPOT_EXPONENT			0x1205
+#define GL_SPOT_CUTOFF				0x1206
+#define GL_CONSTANT_ATTENUATION			0x1207
+#define GL_LINEAR_ATTENUATION			0x1208
+#define GL_QUADRATIC_ATTENUATION		0x1209
+#define GL_AMBIENT				0x1200
+#define GL_DIFFUSE				0x1201
+#define GL_SPECULAR				0x1202
+#define GL_SHININESS				0x1601
+#define GL_EMISSION				0x1600
+#define GL_POSITION				0x1203
+#define GL_SPOT_DIRECTION			0x1204
+#define GL_AMBIENT_AND_DIFFUSE			0x1602
+#define GL_COLOR_INDEXES			0x1603
+#define GL_LIGHT_MODEL_TWO_SIDE			0x0B52
+#define GL_LIGHT_MODEL_LOCAL_VIEWER		0x0B51
+#define GL_LIGHT_MODEL_AMBIENT			0x0B53
+#define GL_FRONT_AND_BACK			0x0408
+#define GL_SHADE_MODEL				0x0B54
+#define GL_FLAT					0x1D00
+#define GL_SMOOTH				0x1D01
+#define GL_COLOR_MATERIAL			0x0B57
+#define GL_COLOR_MATERIAL_FACE			0x0B55
+#define GL_COLOR_MATERIAL_PARAMETER		0x0B56
+#define GL_NORMALIZE				0x0BA1
+
+/* User clipping planes */
+#define GL_CLIP_PLANE0				0x3000
+#define GL_CLIP_PLANE1				0x3001
+#define GL_CLIP_PLANE2				0x3002
+#define GL_CLIP_PLANE3				0x3003
+#define GL_CLIP_PLANE4				0x3004
+#define GL_CLIP_PLANE5				0x3005
+
+/* Accumulation buffer */
+#define GL_ACCUM_RED_BITS			0x0D58
+#define GL_ACCUM_GREEN_BITS			0x0D59
+#define GL_ACCUM_BLUE_BITS			0x0D5A
+#define GL_ACCUM_ALPHA_BITS			0x0D5B
+#define GL_ACCUM_CLEAR_VALUE			0x0B80
+#define GL_ACCUM				0x0100
+#define GL_ADD					0x0104
+#define GL_LOAD					0x0101
+#define GL_MULT					0x0103
+#define GL_RETURN				0x0102
+
+/* Alpha testing */
+#define GL_ALPHA_TEST				0x0BC0
+#define GL_ALPHA_TEST_REF			0x0BC2
+#define GL_ALPHA_TEST_FUNC			0x0BC1
+
+/* Blending */
+#define GL_BLEND				0x0BE2
+#define GL_BLEND_SRC				0x0BE1
+#define GL_BLEND_DST				0x0BE0
+#define GL_ZERO					0x0
+#define GL_ONE					0x1
+#define GL_SRC_COLOR				0x0300
+#define GL_ONE_MINUS_SRC_COLOR			0x0301
+#define GL_SRC_ALPHA				0x0302
+#define GL_ONE_MINUS_SRC_ALPHA			0x0303
+#define GL_DST_ALPHA				0x0304
+#define GL_ONE_MINUS_DST_ALPHA			0x0305
+#define GL_DST_COLOR				0x0306
+#define GL_ONE_MINUS_DST_COLOR			0x0307
+#define GL_SRC_ALPHA_SATURATE			0x0308
+
+/* Render Mode */
+#define GL_FEEDBACK				0x1C01
+#define GL_RENDER				0x1C00
+#define GL_SELECT				0x1C02
+
+/* Feedback */
+#define GL_2D					0x0600
+#define GL_3D					0x0601
+#define GL_3D_COLOR				0x0602
+#define GL_3D_COLOR_TEXTURE			0x0603
+#define GL_4D_COLOR_TEXTURE			0x0604
+#define GL_POINT_TOKEN				0x0701
+#define GL_LINE_TOKEN				0x0702
+#define GL_LINE_RESET_TOKEN			0x0707
+#define GL_POLYGON_TOKEN			0x0703
+#define GL_BITMAP_TOKEN				0x0704
+#define GL_DRAW_PIXEL_TOKEN			0x0705
+#define GL_COPY_PIXEL_TOKEN			0x0706
+#define GL_PASS_THROUGH_TOKEN			0x0700
+#define GL_FEEDBACK_BUFFER_POINTER		0x0DF0
+#define GL_FEEDBACK_BUFFER_SIZE			0x0DF1
+#define GL_FEEDBACK_BUFFER_TYPE			0x0DF2
+
+/* Selection */
+#define GL_SELECTION_BUFFER_POINTER		0x0DF3
+#define GL_SELECTION_BUFFER_SIZE		0x0DF4
+
+/* Fog */
+#define GL_FOG					0x0B60
+#define GL_FOG_MODE				0x0B65
+#define GL_FOG_DENSITY				0x0B62
+#define GL_FOG_COLOR				0x0B66
+#define GL_FOG_INDEX				0x0B61
+#define GL_FOG_START				0x0B63
+#define GL_FOG_END				0x0B64
+#define GL_LINEAR				0x2601
+#define GL_EXP					0x0800
+#define GL_EXP2					0x0801
+
+/* Logic Ops */
+#define GL_LOGIC_OP				0x0BF1
+#define GL_INDEX_LOGIC_OP			0x0BF1
+#define GL_COLOR_LOGIC_OP			0x0BF2
+#define GL_LOGIC_OP_MODE			0x0BF0
+#define GL_CLEAR				0x1500
+#define GL_SET					0x150F
+#define GL_COPY					0x1503
+#define GL_COPY_INVERTED			0x150C
+#define GL_NOOP					0x1505
+#define GL_INVERT				0x150A
+#define GL_AND					0x1501
+#define GL_NAND					0x150E
+#define GL_OR					0x1507
+#define GL_NOR					0x1508
+#define GL_XOR					0x1506
+#define GL_EQUIV				0x1509
+#define GL_AND_REVERSE				0x1502
+#define GL_AND_INVERTED				0x1504
+#define GL_OR_REVERSE				0x150B
+#define GL_OR_INVERTED				0x150D
+
+/* Stencil */
+#define GL_STENCIL_BITS				0x0D57
+#define GL_STENCIL_TEST				0x0B90
+#define GL_STENCIL_CLEAR_VALUE			0x0B91
+#define GL_STENCIL_FUNC				0x0B92
+#define GL_STENCIL_VALUE_MASK			0x0B93
+#define GL_STENCIL_FAIL				0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL		0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS		0x0B96
+#define GL_STENCIL_REF				0x0B97
+#define GL_STENCIL_WRITEMASK			0x0B98
+#define GL_STENCIL_INDEX			0x1901
+#define GL_KEEP					0x1E00
+#define GL_REPLACE				0x1E01
+#define GL_INCR					0x1E02
+#define GL_DECR					0x1E03
+
+/* Buffers, Pixel Drawing/Reading */
+#define GL_NONE					0x0
+#define GL_LEFT					0x0406
+#define GL_RIGHT				0x0407
+/*GL_FRONT					0x0404 */
+/*GL_BACK					0x0405 */
+/*GL_FRONT_AND_BACK				0x0408 */
+#define GL_FRONT_LEFT				0x0400
+#define GL_FRONT_RIGHT				0x0401
+#define GL_BACK_LEFT				0x0402
+#define GL_BACK_RIGHT				0x0403
+#define GL_AUX0					0x0409
+#define GL_AUX1					0x040A
+#define GL_AUX2					0x040B
+#define GL_AUX3					0x040C
+#define GL_COLOR_INDEX				0x1900
+#define GL_RED					0x1903
+#define GL_GREEN				0x1904
+#define GL_BLUE					0x1905
+#define GL_ALPHA				0x1906
+#define GL_LUMINANCE				0x1909
+#define GL_LUMINANCE_ALPHA			0x190A
+#define GL_ALPHA_BITS				0x0D55
+#define GL_RED_BITS				0x0D52
+#define GL_GREEN_BITS				0x0D53
+#define GL_BLUE_BITS				0x0D54
+#define GL_INDEX_BITS				0x0D51
+#define GL_SUBPIXEL_BITS			0x0D50
+#define GL_AUX_BUFFERS				0x0C00
+#define GL_READ_BUFFER				0x0C02
+#define GL_DRAW_BUFFER				0x0C01
+#define GL_DOUBLEBUFFER				0x0C32
+#define GL_STEREO				0x0C33
+#define GL_BITMAP				0x1A00
+#define GL_COLOR				0x1800
+#define GL_DEPTH				0x1801
+#define GL_STENCIL				0x1802
+#define GL_DITHER				0x0BD0
+#define GL_RGB					0x1907
+#define GL_RGBA					0x1908
+
+/* Implementation limits */
+#define GL_MAX_LIST_NESTING			0x0B31
+#define GL_MAX_EVAL_ORDER			0x0D30
+#define GL_MAX_LIGHTS				0x0D31
+#define GL_MAX_CLIP_PLANES			0x0D32
+#define GL_MAX_TEXTURE_SIZE			0x0D33
+#define GL_MAX_PIXEL_MAP_TABLE			0x0D34
+#define GL_MAX_ATTRIB_STACK_DEPTH		0x0D35
+#define GL_MAX_MODELVIEW_STACK_DEPTH		0x0D36
+#define GL_MAX_NAME_STACK_DEPTH			0x0D37
+#define GL_MAX_PROJECTION_STACK_DEPTH		0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH		0x0D39
+#define GL_MAX_VIEWPORT_DIMS			0x0D3A
+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH	0x0D3B
+
+/* Gets */
+#define GL_ATTRIB_STACK_DEPTH			0x0BB0
+#define GL_CLIENT_ATTRIB_STACK_DEPTH		0x0BB1
+#define GL_COLOR_CLEAR_VALUE			0x0C22
+#define GL_COLOR_WRITEMASK			0x0C23
+#define GL_CURRENT_INDEX			0x0B01
+#define GL_CURRENT_COLOR			0x0B00
+#define GL_CURRENT_NORMAL			0x0B02
+#define GL_CURRENT_RASTER_COLOR			0x0B04
+#define GL_CURRENT_RASTER_DISTANCE		0x0B09
+#define GL_CURRENT_RASTER_INDEX			0x0B05
+#define GL_CURRENT_RASTER_POSITION		0x0B07
+#define GL_CURRENT_RASTER_TEXTURE_COORDS	0x0B06
+#define GL_CURRENT_RASTER_POSITION_VALID	0x0B08
+#define GL_CURRENT_TEXTURE_COORDS		0x0B03
+#define GL_INDEX_CLEAR_VALUE			0x0C20
+#define GL_INDEX_MODE				0x0C30
+#define GL_INDEX_WRITEMASK			0x0C21
+#define GL_MODELVIEW_MATRIX			0x0BA6
+#define GL_MODELVIEW_STACK_DEPTH		0x0BA3
+#define GL_NAME_STACK_DEPTH			0x0D70
+#define GL_PROJECTION_MATRIX			0x0BA7
+#define GL_PROJECTION_STACK_DEPTH		0x0BA4
+#define GL_RENDER_MODE				0x0C40
+#define GL_RGBA_MODE				0x0C31
+#define GL_TEXTURE_MATRIX			0x0BA8
+#define GL_TEXTURE_STACK_DEPTH			0x0BA5
+#define GL_VIEWPORT				0x0BA2
+
+/* Evaluators */
+#define GL_AUTO_NORMAL				0x0D80
+#define GL_MAP1_COLOR_4				0x0D90
+#define GL_MAP1_INDEX				0x0D91
+#define GL_MAP1_NORMAL				0x0D92
+#define GL_MAP1_TEXTURE_COORD_1			0x0D93
+#define GL_MAP1_TEXTURE_COORD_2			0x0D94
+#define GL_MAP1_TEXTURE_COORD_3			0x0D95
+#define GL_MAP1_TEXTURE_COORD_4			0x0D96
+#define GL_MAP1_VERTEX_3			0x0D97
+#define GL_MAP1_VERTEX_4			0x0D98
+#define GL_MAP2_COLOR_4				0x0DB0
+#define GL_MAP2_INDEX				0x0DB1
+#define GL_MAP2_NORMAL				0x0DB2
+#define GL_MAP2_TEXTURE_COORD_1			0x0DB3
+#define GL_MAP2_TEXTURE_COORD_2			0x0DB4
+#define GL_MAP2_TEXTURE_COORD_3			0x0DB5
+#define GL_MAP2_TEXTURE_COORD_4			0x0DB6
+#define GL_MAP2_VERTEX_3			0x0DB7
+#define GL_MAP2_VERTEX_4			0x0DB8
+#define GL_MAP1_GRID_DOMAIN			0x0DD0
+#define GL_MAP1_GRID_SEGMENTS			0x0DD1
+#define GL_MAP2_GRID_DOMAIN			0x0DD2
+#define GL_MAP2_GRID_SEGMENTS			0x0DD3
+#define GL_COEFF				0x0A00
+#define GL_ORDER				0x0A01
+#define GL_DOMAIN				0x0A02
+
+/* Hints */
+#define GL_PERSPECTIVE_CORRECTION_HINT		0x0C50
+#define GL_POINT_SMOOTH_HINT			0x0C51
+#define GL_LINE_SMOOTH_HINT			0x0C52
+#define GL_POLYGON_SMOOTH_HINT			0x0C53
+#define GL_FOG_HINT				0x0C54
+#define GL_DONT_CARE				0x1100
+#define GL_FASTEST				0x1101
+#define GL_NICEST				0x1102
+
+/* Scissor box */
+#define GL_SCISSOR_BOX				0x0C10
+#define GL_SCISSOR_TEST				0x0C11
+
+/* Pixel Mode / Transfer */
+#define GL_MAP_COLOR				0x0D10
+#define GL_MAP_STENCIL				0x0D11
+#define GL_INDEX_SHIFT				0x0D12
+#define GL_INDEX_OFFSET				0x0D13
+#define GL_RED_SCALE				0x0D14
+#define GL_RED_BIAS				0x0D15
+#define GL_GREEN_SCALE				0x0D18
+#define GL_GREEN_BIAS				0x0D19
+#define GL_BLUE_SCALE				0x0D1A
+#define GL_BLUE_BIAS				0x0D1B
+#define GL_ALPHA_SCALE				0x0D1C
+#define GL_ALPHA_BIAS				0x0D1D
+#define GL_DEPTH_SCALE				0x0D1E
+#define GL_DEPTH_BIAS				0x0D1F
+#define GL_PIXEL_MAP_S_TO_S_SIZE		0x0CB1
+#define GL_PIXEL_MAP_I_TO_I_SIZE		0x0CB0
+#define GL_PIXEL_MAP_I_TO_R_SIZE		0x0CB2
+#define GL_PIXEL_MAP_I_TO_G_SIZE		0x0CB3
+#define GL_PIXEL_MAP_I_TO_B_SIZE		0x0CB4
+#define GL_PIXEL_MAP_I_TO_A_SIZE		0x0CB5
+#define GL_PIXEL_MAP_R_TO_R_SIZE		0x0CB6
+#define GL_PIXEL_MAP_G_TO_G_SIZE		0x0CB7
+#define GL_PIXEL_MAP_B_TO_B_SIZE		0x0CB8
+#define GL_PIXEL_MAP_A_TO_A_SIZE		0x0CB9
+#define GL_PIXEL_MAP_S_TO_S			0x0C71
+#define GL_PIXEL_MAP_I_TO_I			0x0C70
+#define GL_PIXEL_MAP_I_TO_R			0x0C72
+#define GL_PIXEL_MAP_I_TO_G			0x0C73
+#define GL_PIXEL_MAP_I_TO_B			0x0C74
+#define GL_PIXEL_MAP_I_TO_A			0x0C75
+#define GL_PIXEL_MAP_R_TO_R			0x0C76
+#define GL_PIXEL_MAP_G_TO_G			0x0C77
+#define GL_PIXEL_MAP_B_TO_B			0x0C78
+#define GL_PIXEL_MAP_A_TO_A			0x0C79
+#define GL_PACK_ALIGNMENT			0x0D05
+#define GL_PACK_LSB_FIRST			0x0D01
+#define GL_PACK_ROW_LENGTH			0x0D02
+#define GL_PACK_SKIP_PIXELS			0x0D04
+#define GL_PACK_SKIP_ROWS			0x0D03
+#define GL_PACK_SWAP_BYTES			0x0D00
+#define GL_UNPACK_ALIGNMENT			0x0CF5
+#define GL_UNPACK_LSB_FIRST			0x0CF1
+#define GL_UNPACK_ROW_LENGTH			0x0CF2
+#define GL_UNPACK_SKIP_PIXELS			0x0CF4
+#define GL_UNPACK_SKIP_ROWS			0x0CF3
+#define GL_UNPACK_SWAP_BYTES			0x0CF0
+#define GL_ZOOM_X				0x0D16
+#define GL_ZOOM_Y				0x0D17
+
+/* Texture mapping */
+#define GL_TEXTURE_ENV				0x2300
+#define GL_TEXTURE_ENV_MODE			0x2200
+#define GL_TEXTURE_1D				0x0DE0
+#define GL_TEXTURE_2D				0x0DE1
+#define GL_TEXTURE_WRAP_S			0x2802
+#define GL_TEXTURE_WRAP_T			0x2803
+#define GL_TEXTURE_MAG_FILTER			0x2800
+#define GL_TEXTURE_MIN_FILTER			0x2801
+#define GL_TEXTURE_ENV_COLOR			0x2201
+#define GL_TEXTURE_GEN_S			0x0C60
+#define GL_TEXTURE_GEN_T			0x0C61
+#define GL_TEXTURE_GEN_MODE			0x2500
+#define GL_TEXTURE_BORDER_COLOR			0x1004
+#define GL_TEXTURE_WIDTH			0x1000
+#define GL_TEXTURE_HEIGHT			0x1001
+#define GL_TEXTURE_BORDER			0x1005
+#define GL_TEXTURE_COMPONENTS			0x1003
+#define GL_TEXTURE_RED_SIZE			0x805C
+#define GL_TEXTURE_GREEN_SIZE			0x805D
+#define GL_TEXTURE_BLUE_SIZE			0x805E
+#define GL_TEXTURE_ALPHA_SIZE			0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE		0x8060
+#define GL_TEXTURE_INTENSITY_SIZE		0x8061
+#define GL_NEAREST_MIPMAP_NEAREST		0x2700
+#define GL_NEAREST_MIPMAP_LINEAR		0x2702
+#define GL_LINEAR_MIPMAP_NEAREST		0x2701
+#define GL_LINEAR_MIPMAP_LINEAR			0x2703
+#define GL_OBJECT_LINEAR			0x2401
+#define GL_OBJECT_PLANE				0x2501
+#define GL_EYE_LINEAR				0x2400
+#define GL_EYE_PLANE				0x2502
+#define GL_SPHERE_MAP				0x2402
+#define GL_DECAL				0x2101
+#define GL_MODULATE				0x2100
+#define GL_NEAREST				0x2600
+#define GL_REPEAT				0x2901
+#define GL_CLAMP				0x2900
+#define GL_S					0x2000
+#define GL_T					0x2001
+#define GL_R					0x2002
+#define GL_Q					0x2003
+#define GL_TEXTURE_GEN_R			0x0C62
+#define GL_TEXTURE_GEN_Q			0x0C63
+
+/* Utility */
+#define GL_VENDOR				0x1F00
+#define GL_RENDERER				0x1F01
+#define GL_VERSION				0x1F02
+#define GL_EXTENSIONS				0x1F03
+
+/* Errors */
+#define GL_NO_ERROR 				0x0
+#define GL_INVALID_ENUM				0x0500
+#define GL_INVALID_VALUE			0x0501
+#define GL_INVALID_OPERATION			0x0502
+#define GL_STACK_OVERFLOW			0x0503
+#define GL_STACK_UNDERFLOW			0x0504
+#define GL_OUT_OF_MEMORY			0x0505
+
+/* glPush/PopAttrib bits */
+#define GL_CURRENT_BIT				0x00000001
+#define GL_POINT_BIT				0x00000002
+#define GL_LINE_BIT				0x00000004
+#define GL_POLYGON_BIT				0x00000008
+#define GL_POLYGON_STIPPLE_BIT			0x00000010
+#define GL_PIXEL_MODE_BIT			0x00000020
+#define GL_LIGHTING_BIT				0x00000040
+#define GL_FOG_BIT				0x00000080
+#define GL_DEPTH_BUFFER_BIT			0x00000100
+#define GL_ACCUM_BUFFER_BIT			0x00000200
+#define GL_STENCIL_BUFFER_BIT			0x00000400
+#define GL_VIEWPORT_BIT				0x00000800
+#define GL_TRANSFORM_BIT			0x00001000
+#define GL_ENABLE_BIT				0x00002000
+#define GL_COLOR_BUFFER_BIT			0x00004000
+#define GL_HINT_BIT				0x00008000
+#define GL_EVAL_BIT				0x00010000
+#define GL_LIST_BIT				0x00020000
+#define GL_TEXTURE_BIT				0x00040000
+#define GL_SCISSOR_BIT				0x00080000
+#define GL_ALL_ATTRIB_BITS			0x000FFFFF
+
+
+/* OpenGL 1.1 */
+#define GL_PROXY_TEXTURE_1D			0x8063
+#define GL_PROXY_TEXTURE_2D			0x8064
+#define GL_TEXTURE_PRIORITY			0x8066
+#define GL_TEXTURE_RESIDENT			0x8067
+#define GL_TEXTURE_BINDING_1D			0x8068
+#define GL_TEXTURE_BINDING_2D			0x8069
+#define GL_TEXTURE_INTERNAL_FORMAT		0x1003
+#define GL_ALPHA4				0x803B
+#define GL_ALPHA8				0x803C
+#define GL_ALPHA12				0x803D
+#define GL_ALPHA16				0x803E
+#define GL_LUMINANCE4				0x803F
+#define GL_LUMINANCE8				0x8040
+#define GL_LUMINANCE12				0x8041
+#define GL_LUMINANCE16				0x8042
+#define GL_LUMINANCE4_ALPHA4			0x8043
+#define GL_LUMINANCE6_ALPHA2			0x8044
+#define GL_LUMINANCE8_ALPHA8			0x8045
+#define GL_LUMINANCE12_ALPHA4			0x8046
+#define GL_LUMINANCE12_ALPHA12			0x8047
+#define GL_LUMINANCE16_ALPHA16			0x8048
+#define GL_INTENSITY				0x8049
+#define GL_INTENSITY4				0x804A
+#define GL_INTENSITY8				0x804B
+#define GL_INTENSITY12				0x804C
+#define GL_INTENSITY16				0x804D
+#define GL_R3_G3_B2				0x2A10
+#define GL_RGB4					0x804F
+#define GL_RGB5					0x8050
+#define GL_RGB8					0x8051
+#define GL_RGB10				0x8052
+#define GL_RGB12				0x8053
+#define GL_RGB16				0x8054
+#define GL_RGBA2				0x8055
+#define GL_RGBA4				0x8056
+#define GL_RGB5_A1				0x8057
+#define GL_RGBA8				0x8058
+#define GL_RGB10_A2				0x8059
+#define GL_RGBA12				0x805A
+#define GL_RGBA16				0x805B
+#define GL_CLIENT_PIXEL_STORE_BIT		0x00000001
+#define GL_CLIENT_VERTEX_ARRAY_BIT		0x00000002
+#define GL_ALL_CLIENT_ATTRIB_BITS 		0xFFFFFFFF
+#define GL_CLIENT_ALL_ATTRIB_BITS 		0xFFFFFFFF
+
+
+
+/*
+ * Miscellaneous
+ */
+
+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
+
+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
+
+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
+
+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
+
+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
+
+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
+
+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
+
+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
+
+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
+
+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
+
+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
+
+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
+
+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
+
+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
+
+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte xxx[128]);
+
+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
+
+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
+
+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
+
+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
+
+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble xxx[4]);
+
+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
+
+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY glEnable( GLenum cap );
+
+GLAPI void GLAPIENTRY glDisable( GLenum cap );
+
+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
+
+
+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap );  /* 1.1 */
+
+
+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
+
+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
+
+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
+
+GLAPI void GLAPIENTRY glPopAttrib( void );
+
+
+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glPopClientAttrib( void );  /* 1.1 */
+
+
+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
+
+GLAPI GLenum GLAPIENTRY glGetError( void );
+
+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
+
+GLAPI void GLAPIENTRY glFinish( void );
+
+GLAPI void GLAPIENTRY glFlush( void );
+
+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
+
+
+/*
+ * Depth Buffer
+ */
+
+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
+
+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
+
+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
+
+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
+
+
+/*
+ * Accumulation Buffer
+ */
+
+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
+
+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
+
+
+/*
+ * Transformation
+ */
+
+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
+
+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
+                                 GLdouble bottom, GLdouble top,
+                                 GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
+                                   GLdouble bottom, GLdouble top,
+                                   GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
+                                    GLsizei width, GLsizei height );
+
+GLAPI void GLAPIENTRY glPushMatrix( void );
+
+GLAPI void GLAPIENTRY glPopMatrix( void );
+
+GLAPI void GLAPIENTRY glLoadIdentity( void );
+
+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble xxx[16]);
+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat xxx[16]);
+
+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble xxx[16]);
+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat xxx[16]);
+
+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
+                                   GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
+                                   GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
+
+
+/*
+ * Display Lists
+ */
+
+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
+
+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
+
+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
+
+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
+
+GLAPI void GLAPIENTRY glEndList( void );
+
+GLAPI void GLAPIENTRY glCallList( GLuint list );
+
+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
+                                     const GLvoid *lists );
+
+GLAPI void GLAPIENTRY glListBase( GLuint base );
+
+
+/*
+ * Drawing Functions
+ */
+
+GLAPI void GLAPIENTRY glBegin( GLenum mode );
+
+GLAPI void GLAPIENTRY glEnd( void );
+
+
+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble xxx[2]);
+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat xxx[2]);
+GLAPI void GLAPIENTRY glVertex2iv( const GLint xxx[2]);
+GLAPI void GLAPIENTRY glVertex2sv( const GLshort xxx[2]);
+
+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble xxx[3]);
+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat xxx[3]);
+GLAPI void GLAPIENTRY glVertex3iv( const GLint xxx[3]);
+GLAPI void GLAPIENTRY glVertex3sv( const GLshort xxx[3]);
+
+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble xxx[4]);
+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat xxx[4]);
+GLAPI void GLAPIENTRY glVertex4iv( const GLint xxx[4]);
+GLAPI void GLAPIENTRY glVertex4sv( const GLshort xxx[4]);
+
+
+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
+
+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte xxx[3]);
+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble xxx[3]);
+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat xxx[3]);
+GLAPI void GLAPIENTRY glNormal3iv( const GLint xxx[3]);
+GLAPI void GLAPIENTRY glNormal3sv( const GLshort xxx[3]);
+
+
+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
+GLAPI void GLAPIENTRY glIndexi( GLint c );
+GLAPI void GLAPIENTRY glIndexs( GLshort c );
+GLAPI void GLAPIENTRY glIndexub( GLubyte c );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
+
+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
+                                   GLbyte blue, GLbyte alpha );
+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
+                                   GLdouble blue, GLdouble alpha );
+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
+                                   GLfloat blue, GLfloat alpha );
+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
+                                   GLint blue, GLint alpha );
+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
+                                   GLshort blue, GLshort alpha );
+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
+                                    GLubyte blue, GLubyte alpha );
+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
+                                    GLuint blue, GLuint alpha );
+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
+                                    GLushort blue, GLushort alpha );
+
+
+GLAPI void GLAPIENTRY glColor3bv( const GLbyte xxx[3]);
+GLAPI void GLAPIENTRY glColor3dv( const GLdouble xxx[3]);
+GLAPI void GLAPIENTRY glColor3fv( const GLfloat xxx[3]);
+GLAPI void GLAPIENTRY glColor3iv( const GLint xxx[3]);
+GLAPI void GLAPIENTRY glColor3sv( const GLshort xxx[3]);
+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte xxx[3]);
+GLAPI void GLAPIENTRY glColor3uiv( const GLuint xxx[3]);
+GLAPI void GLAPIENTRY glColor3usv( const GLushort xxx[3]);
+
+GLAPI void GLAPIENTRY glColor4bv( const GLbyte xxx[4]);
+GLAPI void GLAPIENTRY glColor4dv( const GLdouble xxx[4]);
+GLAPI void GLAPIENTRY glColor4fv( const GLfloat xxx[4]);
+GLAPI void GLAPIENTRY glColor4iv( const GLint xxx[4]);
+GLAPI void GLAPIENTRY glColor4sv( const GLshort xxx[4]);
+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte xxx[4]);
+GLAPI void GLAPIENTRY glColor4uiv( const GLuint xxx[4]);
+GLAPI void GLAPIENTRY glColor4usv( const GLushort xxx[4]);
+
+
+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
+
+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble xxx[2]);
+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat xxx[2]);
+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint xxx[2]);
+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort xxx[2]);
+
+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble xxx[3]);
+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat xxx[3]);
+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint xxx[3]);
+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort xxx[3]);
+
+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble xxx[4]);
+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat xxx[4]);
+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint xxx[4]);
+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort xxx[4]);
+
+
+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
+
+
+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
+
+
+/*
+ * Vertex Arrays  (1.1)
+ */
+
+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
+                                       GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
+                                       const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
+                                      GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
+                                      const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
+                                         GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
+
+GLAPI void GLAPIENTRY glArrayElement( GLint i );
+
+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
+
+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
+                                      GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
+                                           const GLvoid *pointer );
+
+/*
+ * Lighting
+ */
+
+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
+
+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
+                                 const GLfloat *params );
+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
+                                 const GLint *params );
+
+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
+                                    GLfloat *params );
+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
+                                    GLint *params );
+
+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
+
+
+/*
+ * Raster functions
+ */
+
+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
+
+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
+                                    const GLfloat *values );
+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
+                                     const GLuint *values );
+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
+                                     const GLushort *values );
+
+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
+
+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
+                                GLfloat xorig, GLfloat yorig,
+                                GLfloat xmove, GLfloat ymove,
+                                const GLubyte *bitmap );
+
+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
+                                    GLsizei width, GLsizei height,
+                                    GLenum format, GLenum type,
+                                    GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
+                                    GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
+                                    GLsizei width, GLsizei height,
+                                    GLenum type );
+
+/*
+ * Stenciling
+ */
+
+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
+
+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
+
+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
+
+GLAPI void GLAPIENTRY glClearStencil( GLint s );
+
+
+
+/*
+ * Texture mapping
+ */
+
+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
+                                          const GLfloat *params );
+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
+                                          const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
+                                           GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
+                                           GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
+                                                GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
+                                                GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
+                                    GLint internalFormat,
+                                    GLsizei width, GLint border,
+                                    GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
+                                    GLint internalFormat,
+                                    GLsizei width, GLsizei height,
+                                    GLint border, GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
+                                     GLenum format, GLenum type,
+                                     GLvoid *pixels );
+
+
+/* 1.1 functions */
+
+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
+
+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
+
+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
+
+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
+                                            const GLuint *textures,
+                                            const GLclampf *priorities );
+
+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
+                                                  const GLuint *textures,
+                                                  GLboolean *residences );
+
+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
+
+
+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
+                                       GLint xoffset,
+                                       GLsizei width, GLenum format,
+                                       GLenum type, const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
+                                       GLint xoffset, GLint yoffset,
+                                       GLsizei width, GLsizei height,
+                                       GLenum format, GLenum type,
+                                       const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
+                                        GLenum internalformat,
+                                        GLint x, GLint y,
+                                        GLsizei width, GLint border );
+
+
+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
+                                        GLenum internalformat,
+                                        GLint x, GLint y,
+                                        GLsizei width, GLsizei height,
+                                        GLint border );
+
+
+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
+                                           GLint xoffset, GLint x, GLint y,
+                                           GLsizei width );
+
+
+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
+                                           GLint xoffset, GLint yoffset,
+                                           GLint x, GLint y,
+                                           GLsizei width, GLsizei height );
+
+
+/*
+ * Evaluators
+ */
+
+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
+                               GLint stride,
+                               GLint order, const GLdouble *points );
+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
+                               GLint stride,
+                               GLint order, const GLfloat *points );
+
+GLAPI void GLAPIENTRY glMap2d( GLenum target,
+		     GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
+		     GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
+		     const GLdouble *points );
+GLAPI void GLAPIENTRY glMap2f( GLenum target,
+		     GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
+		     GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
+		     const GLfloat *points );
+
+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
+
+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
+
+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
+
+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
+
+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
+                                   GLint vn, GLdouble v1, GLdouble v2 );
+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
+                                   GLint vn, GLfloat v1, GLfloat v2 );
+
+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
+
+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
+
+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
+
+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
+
+
+/*
+ * Fog
+ */
+
+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
+
+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
+
+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
+
+
+/*
+ * Selection and Feedback
+ */
+
+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
+
+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
+
+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
+
+GLAPI void GLAPIENTRY glInitNames( void );
+
+GLAPI void GLAPIENTRY glLoadName( GLuint name );
+
+GLAPI void GLAPIENTRY glPushName( GLuint name );
+
+GLAPI void GLAPIENTRY glPopName( void );
+
+
+
+/*
+ * OpenGL 1.2
+ */
+
+#define GL_RESCALE_NORMAL			0x803A
+#define GL_CLAMP_TO_EDGE			0x812F
+#define GL_MAX_ELEMENTS_VERTICES		0x80E8
+#define GL_MAX_ELEMENTS_INDICES			0x80E9
+#define GL_BGR					0x80E0
+#define GL_BGRA					0x80E1
+#define GL_UNSIGNED_BYTE_3_3_2			0x8032
+#define GL_UNSIGNED_BYTE_2_3_3_REV		0x8362
+#define GL_UNSIGNED_SHORT_5_6_5			0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV		0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4		0x8033
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV		0x8365
+#define GL_UNSIGNED_SHORT_5_5_5_1		0x8034
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV		0x8366
+#define GL_UNSIGNED_INT_8_8_8_8			0x8035
+#define GL_UNSIGNED_INT_8_8_8_8_REV		0x8367
+#define GL_UNSIGNED_INT_10_10_10_2		0x8036
+#define GL_UNSIGNED_INT_2_10_10_10_REV		0x8368
+#define GL_LIGHT_MODEL_COLOR_CONTROL		0x81F8
+#define GL_SINGLE_COLOR				0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR		0x81FA
+#define GL_TEXTURE_MIN_LOD			0x813A
+#define GL_TEXTURE_MAX_LOD			0x813B
+#define GL_TEXTURE_BASE_LEVEL			0x813C
+#define GL_TEXTURE_MAX_LEVEL			0x813D
+#define GL_SMOOTH_POINT_SIZE_RANGE		0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY	0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE		0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY	0x0B23
+#define GL_ALIASED_POINT_SIZE_RANGE		0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE		0x846E
+#define GL_PACK_SKIP_IMAGES			0x806B
+#define GL_PACK_IMAGE_HEIGHT			0x806C
+#define GL_UNPACK_SKIP_IMAGES			0x806D
+#define GL_UNPACK_IMAGE_HEIGHT			0x806E
+#define GL_TEXTURE_3D				0x806F
+#define GL_PROXY_TEXTURE_3D			0x8070
+#define GL_TEXTURE_DEPTH			0x8071
+#define GL_TEXTURE_WRAP_R			0x8072
+#define GL_MAX_3D_TEXTURE_SIZE			0x8073
+#define GL_TEXTURE_BINDING_3D			0x806A
+
+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
+	GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
+                                      GLint internalFormat,
+                                      GLsizei width, GLsizei height,
+                                      GLsizei depth, GLint border,
+                                      GLenum format, GLenum type,
+                                      const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
+                                         GLint xoffset, GLint yoffset,
+                                         GLint zoffset, GLsizei width,
+                                         GLsizei height, GLsizei depth,
+                                         GLenum format,
+                                         GLenum type, const GLvoid *pixels);
+
+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
+                                             GLint xoffset, GLint yoffset,
+                                             GLint zoffset, GLint x,
+                                             GLint y, GLsizei width,
+                                             GLsizei height );
+
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+
+
+/*
+ * GL_ARB_imaging
+ */
+
+#define GL_CONSTANT_COLOR			0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR		0x8002
+#define GL_CONSTANT_ALPHA			0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA		0x8004
+#define GL_COLOR_TABLE				0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE		0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE	0x80D2
+#define GL_PROXY_COLOR_TABLE			0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE	0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE	0x80D5
+#define GL_COLOR_TABLE_SCALE			0x80D6
+#define GL_COLOR_TABLE_BIAS			0x80D7
+#define GL_COLOR_TABLE_FORMAT			0x80D8
+#define GL_COLOR_TABLE_WIDTH			0x80D9
+#define GL_COLOR_TABLE_RED_SIZE			0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE		0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE		0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE		0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE		0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE		0x80DF
+#define GL_CONVOLUTION_1D			0x8010
+#define GL_CONVOLUTION_2D			0x8011
+#define GL_SEPARABLE_2D				0x8012
+#define GL_CONVOLUTION_BORDER_MODE		0x8013
+#define GL_CONVOLUTION_FILTER_SCALE		0x8014
+#define GL_CONVOLUTION_FILTER_BIAS		0x8015
+#define GL_REDUCE				0x8016
+#define GL_CONVOLUTION_FORMAT			0x8017
+#define GL_CONVOLUTION_WIDTH			0x8018
+#define GL_CONVOLUTION_HEIGHT			0x8019
+#define GL_MAX_CONVOLUTION_WIDTH		0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT		0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE		0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE		0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE		0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE		0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS		0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS		0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS		0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS		0x8023
+#define GL_CONSTANT_BORDER			0x8151
+#define GL_REPLICATE_BORDER			0x8153
+#define GL_CONVOLUTION_BORDER_COLOR		0x8154
+#define GL_COLOR_MATRIX				0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH		0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH		0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE		0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE	0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE		0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE	0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS		0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS		0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS		0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS		0x80BB
+#define GL_HISTOGRAM				0x8024
+#define GL_PROXY_HISTOGRAM			0x8025
+#define GL_HISTOGRAM_WIDTH			0x8026
+#define GL_HISTOGRAM_FORMAT			0x8027
+#define GL_HISTOGRAM_RED_SIZE			0x8028
+#define GL_HISTOGRAM_GREEN_SIZE			0x8029
+#define GL_HISTOGRAM_BLUE_SIZE			0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE			0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE		0x802C
+#define GL_HISTOGRAM_SINK			0x802D
+#define GL_MINMAX				0x802E
+#define GL_MINMAX_FORMAT			0x802F
+#define GL_MINMAX_SINK				0x8030
+#define GL_TABLE_TOO_LARGE			0x8031
+#define GL_BLEND_EQUATION			0x8009
+#define GL_MIN					0x8007
+#define GL_MAX					0x8008
+#define GL_FUNC_ADD				0x8006
+#define GL_FUNC_SUBTRACT			0x800A
+#define GL_FUNC_REVERSE_SUBTRACT		0x800B
+#define GL_BLEND_COLOR				0x8005
+
+
+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
+                                    GLsizei width, GLenum format,
+                                    GLenum type, const GLvoid *table );
+
+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
+                                       GLsizei start, GLsizei count,
+                                       GLenum format, GLenum type,
+                                       const GLvoid *data );
+
+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
+                                              const GLint *params);
+
+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
+                                              const GLfloat *params);
+
+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
+                                           GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
+                                        GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
+                                       GLenum type, GLvoid *table );
+
+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
+                                                  GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
+                                                  GLint *params );
+
+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
+
+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
+                                    GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
+				   GLenum internalformat, GLboolean sink );
+
+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
+
+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
+				      GLenum format, GLenum type,
+				      GLvoid *values );
+
+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
+						 GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
+						 GLint *params );
+
+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
+				GLboolean sink );
+
+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
+
+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
+                                   GLenum format, GLenum types,
+                                   GLvoid *values );
+
+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
+					      GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
+					      GLint *params );
+
+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
+	GLenum internalformat, GLsizei width, GLenum format, GLenum type,
+	const GLvoid *image );
+
+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
+	GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+	GLenum type, const GLvoid *image );
+
+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
+	GLfloat params );
+
+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
+	const GLfloat *params );
+
+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
+	GLint params );
+
+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
+	const GLint *params );
+
+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
+	GLenum internalformat, GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
+	GLenum internalformat, GLint x, GLint y, GLsizei width,
+	GLsizei height);
+
+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
+	GLenum type, GLvoid *image );
+
+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
+	GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
+	GLint *params );
+
+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
+	GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+	GLenum type, const GLvoid *row, const GLvoid *column );
+
+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
+	GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
+
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
+
+
+
+/*
+ * OpenGL 1.3
+ */
+
+/* multitexture */
+#define GL_TEXTURE0				0x84C0
+#define GL_TEXTURE1				0x84C1
+#define GL_TEXTURE2				0x84C2
+#define GL_TEXTURE3				0x84C3
+#define GL_TEXTURE4				0x84C4
+#define GL_TEXTURE5				0x84C5
+#define GL_TEXTURE6				0x84C6
+#define GL_TEXTURE7				0x84C7
+#define GL_TEXTURE8				0x84C8
+#define GL_TEXTURE9				0x84C9
+#define GL_TEXTURE10				0x84CA
+#define GL_TEXTURE11				0x84CB
+#define GL_TEXTURE12				0x84CC
+#define GL_TEXTURE13				0x84CD
+#define GL_TEXTURE14				0x84CE
+#define GL_TEXTURE15				0x84CF
+#define GL_TEXTURE16				0x84D0
+#define GL_TEXTURE17				0x84D1
+#define GL_TEXTURE18				0x84D2
+#define GL_TEXTURE19				0x84D3
+#define GL_TEXTURE20				0x84D4
+#define GL_TEXTURE21				0x84D5
+#define GL_TEXTURE22				0x84D6
+#define GL_TEXTURE23				0x84D7
+#define GL_TEXTURE24				0x84D8
+#define GL_TEXTURE25				0x84D9
+#define GL_TEXTURE26				0x84DA
+#define GL_TEXTURE27				0x84DB
+#define GL_TEXTURE28				0x84DC
+#define GL_TEXTURE29				0x84DD
+#define GL_TEXTURE30				0x84DE
+#define GL_TEXTURE31				0x84DF
+#define GL_ACTIVE_TEXTURE			0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE		0x84E1
+#define GL_MAX_TEXTURE_UNITS			0x84E2
+/* texture_cube_map */
+#define GL_NORMAL_MAP				0x8511
+#define GL_REFLECTION_MAP			0x8512
+#define GL_TEXTURE_CUBE_MAP			0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP		0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X		0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X		0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y		0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y		0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z		0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z		0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP		0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE		0x851C
+/* texture_compression */
+#define GL_COMPRESSED_ALPHA			0x84E9
+#define GL_COMPRESSED_LUMINANCE			0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA		0x84EB
+#define GL_COMPRESSED_INTENSITY			0x84EC
+#define GL_COMPRESSED_RGB			0x84ED
+#define GL_COMPRESSED_RGBA			0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT		0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE	0x86A0
+#define GL_TEXTURE_COMPRESSED			0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS	0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS		0x86A3
+/* multisample */
+#define GL_MULTISAMPLE				0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE		0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE			0x809F
+#define GL_SAMPLE_COVERAGE			0x80A0
+#define GL_SAMPLE_BUFFERS			0x80A8
+#define GL_SAMPLES				0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE		0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT		0x80AB
+#define GL_MULTISAMPLE_BIT			0x20000000
+/* transpose_matrix */
+#define GL_TRANSPOSE_MODELVIEW_MATRIX		0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX		0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX		0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX		0x84E6
+/* texture_env_combine */
+#define GL_COMBINE				0x8570
+#define GL_COMBINE_RGB				0x8571
+#define GL_COMBINE_ALPHA			0x8572
+#define GL_SOURCE0_RGB				0x8580
+#define GL_SOURCE1_RGB				0x8581
+#define GL_SOURCE2_RGB				0x8582
+#define GL_SOURCE0_ALPHA			0x8588
+#define GL_SOURCE1_ALPHA			0x8589
+#define GL_SOURCE2_ALPHA			0x858A
+#define GL_OPERAND0_RGB				0x8590
+#define GL_OPERAND1_RGB				0x8591
+#define GL_OPERAND2_RGB				0x8592
+#define GL_OPERAND0_ALPHA			0x8598
+#define GL_OPERAND1_ALPHA			0x8599
+#define GL_OPERAND2_ALPHA			0x859A
+#define GL_RGB_SCALE				0x8573
+#define GL_ADD_SIGNED				0x8574
+#define GL_INTERPOLATE				0x8575
+#define GL_SUBTRACT				0x84E7
+#define GL_CONSTANT				0x8576
+#define GL_PRIMARY_COLOR			0x8577
+#define GL_PREVIOUS				0x8578
+/* texture_env_dot3 */
+#define GL_DOT3_RGB				0x86AE
+#define GL_DOT3_RGBA				0x86AF
+/* texture_border_clamp */
+#define GL_CLAMP_TO_BORDER			0x812D
+
+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
+
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
+
+
+/*
+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
+ */
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+
+#define GL_TEXTURE0_ARB				0x84C0
+#define GL_TEXTURE1_ARB				0x84C1
+#define GL_TEXTURE2_ARB				0x84C2
+#define GL_TEXTURE3_ARB				0x84C3
+#define GL_TEXTURE4_ARB				0x84C4
+#define GL_TEXTURE5_ARB				0x84C5
+#define GL_TEXTURE6_ARB				0x84C6
+#define GL_TEXTURE7_ARB				0x84C7
+#define GL_TEXTURE8_ARB				0x84C8
+#define GL_TEXTURE9_ARB				0x84C9
+#define GL_TEXTURE10_ARB			0x84CA
+#define GL_TEXTURE11_ARB			0x84CB
+#define GL_TEXTURE12_ARB			0x84CC
+#define GL_TEXTURE13_ARB			0x84CD
+#define GL_TEXTURE14_ARB			0x84CE
+#define GL_TEXTURE15_ARB			0x84CF
+#define GL_TEXTURE16_ARB			0x84D0
+#define GL_TEXTURE17_ARB			0x84D1
+#define GL_TEXTURE18_ARB			0x84D2
+#define GL_TEXTURE19_ARB			0x84D3
+#define GL_TEXTURE20_ARB			0x84D4
+#define GL_TEXTURE21_ARB			0x84D5
+#define GL_TEXTURE22_ARB			0x84D6
+#define GL_TEXTURE23_ARB			0x84D7
+#define GL_TEXTURE24_ARB			0x84D8
+#define GL_TEXTURE25_ARB			0x84D9
+#define GL_TEXTURE26_ARB			0x84DA
+#define GL_TEXTURE27_ARB			0x84DB
+#define GL_TEXTURE28_ARB			0x84DC
+#define GL_TEXTURE29_ARB			0x84DD
+#define GL_TEXTURE30_ARB			0x84DE
+#define GL_TEXTURE31_ARB			0x84DF
+#define GL_ACTIVE_TEXTURE_ARB			0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB		0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB		0x84E2
+
+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
+
+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+
+#endif /* GL_ARB_multitexture */
+
+
+
+/*
+ * Define this token if you want "old-style" header file behaviour (extensions
+ * defined in gl.h).  Otherwise, extensions will be included from glext.h.
+ */
+#if defined(GL_GLEXT_LEGACY)
+
+/* All extensions that used to be here are now found in glext.h */
+
+#else  /* GL_GLEXT_LEGACY */
+
+#include <GL/glext.h>
+
+#endif  /* GL_GLEXT_LEGACY */
+
+
+
+#if GL_ARB_shader_objects
+
+#ifndef GL_MESA_shader_debug
+#define GL_MESA_shader_debug 1
+
+#define GL_DEBUG_OBJECT_MESA              0x8759
+#define GL_DEBUG_PRINT_MESA               0x875A
+#define GL_DEBUG_ASSERT_MESA              0x875B
+
+GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
+GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
+                                         GLsizei *length, GLcharARB *debugLog);
+GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+
+#endif /* GL_MESA_shader_debug */
+
+#endif /* GL_ARB_shader_objects */
+
+
+/*
+ * ???. GL_MESA_packed_depth_stencil
+ * XXX obsolete
+ */
+#ifndef GL_MESA_packed_depth_stencil
+#define GL_MESA_packed_depth_stencil 1
+
+#define GL_DEPTH_STENCIL_MESA			0x8750
+#define GL_UNSIGNED_INT_24_8_MESA		0x8751
+#define GL_UNSIGNED_INT_8_24_REV_MESA		0x8752
+#define GL_UNSIGNED_SHORT_15_1_MESA		0x8753
+#define GL_UNSIGNED_SHORT_1_15_REV_MESA		0x8754
+
+#endif /* GL_MESA_packed_depth_stencil */
+
+
+#ifndef GL_MESA_program_debug
+#define GL_MESA_program_debug 1
+
+#define GL_FRAGMENT_PROGRAM_POSITION_MESA       0x8bb0
+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA       0x8bb1
+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA  0x8bb2
+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA  0x8bb3
+#define GL_VERTEX_PROGRAM_POSITION_MESA         0x8bb4
+#define GL_VERTEX_PROGRAM_CALLBACK_MESA         0x8bb5
+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA    0x8bb6
+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA    0x8bb7
+
+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
+
+GLAPI void GLAPIENTRY (GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
+
+GLAPI void GLAPIENTRY (GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
+
+#endif /* GL_MESA_program_debug */
+
+
+#ifndef GL_ATI_blend_equation_separate
+#define GL_ATI_blend_equation_separate 1
+
+#define GL_ALPHA_BLEND_EQUATION_ATI	        0x883D
+
+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
+
+#endif /* GL_ATI_blend_equation_separate */
+
+
+
+/**
+ ** NOTE!!!!!  If you add new functions to this file, or update
+ ** glext.h be sure to regenerate the gl_mangle.h file.  See comments
+ ** in that file for details.
+ **/
+
+
+
+/**********************************************************************
+ * Begin system-specific stuff
+ */
+#if defined(PRAGMA_EXPORT_SUPPORTED)
+#pragma export off
+#endif
+
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import off
+#endif
+/*
+ * End system-specific stuff
+ **********************************************************************/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl_h_ */

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib.py
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib.py	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib.py	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,1306 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.33
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _gllib
+import new
+new_instancemethod = new.instancemethod
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'PySwigObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError,name
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+    _object = types.ObjectType
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+del types
+
+
+GL_VERSION_1_1 = _gllib.GL_VERSION_1_1
+GL_VERSION_1_2 = _gllib.GL_VERSION_1_2
+GL_VERSION_1_3 = _gllib.GL_VERSION_1_3
+GL_ARB_imaging = _gllib.GL_ARB_imaging
+GL_FALSE = _gllib.GL_FALSE
+GL_TRUE = _gllib.GL_TRUE
+GL_BYTE = _gllib.GL_BYTE
+GL_UNSIGNED_BYTE = _gllib.GL_UNSIGNED_BYTE
+GL_SHORT = _gllib.GL_SHORT
+GL_UNSIGNED_SHORT = _gllib.GL_UNSIGNED_SHORT
+GL_INT = _gllib.GL_INT
+GL_UNSIGNED_INT = _gllib.GL_UNSIGNED_INT
+GL_FLOAT = _gllib.GL_FLOAT
+GL_2_BYTES = _gllib.GL_2_BYTES
+GL_3_BYTES = _gllib.GL_3_BYTES
+GL_4_BYTES = _gllib.GL_4_BYTES
+GL_DOUBLE = _gllib.GL_DOUBLE
+GL_POINTS = _gllib.GL_POINTS
+GL_LINES = _gllib.GL_LINES
+GL_LINE_LOOP = _gllib.GL_LINE_LOOP
+GL_LINE_STRIP = _gllib.GL_LINE_STRIP
+GL_TRIANGLES = _gllib.GL_TRIANGLES
+GL_TRIANGLE_STRIP = _gllib.GL_TRIANGLE_STRIP
+GL_TRIANGLE_FAN = _gllib.GL_TRIANGLE_FAN
+GL_QUADS = _gllib.GL_QUADS
+GL_QUAD_STRIP = _gllib.GL_QUAD_STRIP
+GL_POLYGON = _gllib.GL_POLYGON
+GL_VERTEX_ARRAY = _gllib.GL_VERTEX_ARRAY
+GL_NORMAL_ARRAY = _gllib.GL_NORMAL_ARRAY
+GL_COLOR_ARRAY = _gllib.GL_COLOR_ARRAY
+GL_INDEX_ARRAY = _gllib.GL_INDEX_ARRAY
+GL_TEXTURE_COORD_ARRAY = _gllib.GL_TEXTURE_COORD_ARRAY
+GL_EDGE_FLAG_ARRAY = _gllib.GL_EDGE_FLAG_ARRAY
+GL_VERTEX_ARRAY_SIZE = _gllib.GL_VERTEX_ARRAY_SIZE
+GL_VERTEX_ARRAY_TYPE = _gllib.GL_VERTEX_ARRAY_TYPE
+GL_VERTEX_ARRAY_STRIDE = _gllib.GL_VERTEX_ARRAY_STRIDE
+GL_NORMAL_ARRAY_TYPE = _gllib.GL_NORMAL_ARRAY_TYPE
+GL_NORMAL_ARRAY_STRIDE = _gllib.GL_NORMAL_ARRAY_STRIDE
+GL_COLOR_ARRAY_SIZE = _gllib.GL_COLOR_ARRAY_SIZE
+GL_COLOR_ARRAY_TYPE = _gllib.GL_COLOR_ARRAY_TYPE
+GL_COLOR_ARRAY_STRIDE = _gllib.GL_COLOR_ARRAY_STRIDE
+GL_INDEX_ARRAY_TYPE = _gllib.GL_INDEX_ARRAY_TYPE
+GL_INDEX_ARRAY_STRIDE = _gllib.GL_INDEX_ARRAY_STRIDE
+GL_TEXTURE_COORD_ARRAY_SIZE = _gllib.GL_TEXTURE_COORD_ARRAY_SIZE
+GL_TEXTURE_COORD_ARRAY_TYPE = _gllib.GL_TEXTURE_COORD_ARRAY_TYPE
+GL_TEXTURE_COORD_ARRAY_STRIDE = _gllib.GL_TEXTURE_COORD_ARRAY_STRIDE
+GL_EDGE_FLAG_ARRAY_STRIDE = _gllib.GL_EDGE_FLAG_ARRAY_STRIDE
+GL_VERTEX_ARRAY_POINTER = _gllib.GL_VERTEX_ARRAY_POINTER
+GL_NORMAL_ARRAY_POINTER = _gllib.GL_NORMAL_ARRAY_POINTER
+GL_COLOR_ARRAY_POINTER = _gllib.GL_COLOR_ARRAY_POINTER
+GL_INDEX_ARRAY_POINTER = _gllib.GL_INDEX_ARRAY_POINTER
+GL_TEXTURE_COORD_ARRAY_POINTER = _gllib.GL_TEXTURE_COORD_ARRAY_POINTER
+GL_EDGE_FLAG_ARRAY_POINTER = _gllib.GL_EDGE_FLAG_ARRAY_POINTER
+GL_V2F = _gllib.GL_V2F
+GL_V3F = _gllib.GL_V3F
+GL_C4UB_V2F = _gllib.GL_C4UB_V2F
+GL_C4UB_V3F = _gllib.GL_C4UB_V3F
+GL_C3F_V3F = _gllib.GL_C3F_V3F
+GL_N3F_V3F = _gllib.GL_N3F_V3F
+GL_C4F_N3F_V3F = _gllib.GL_C4F_N3F_V3F
+GL_T2F_V3F = _gllib.GL_T2F_V3F
+GL_T4F_V4F = _gllib.GL_T4F_V4F
+GL_T2F_C4UB_V3F = _gllib.GL_T2F_C4UB_V3F
+GL_T2F_C3F_V3F = _gllib.GL_T2F_C3F_V3F
+GL_T2F_N3F_V3F = _gllib.GL_T2F_N3F_V3F
+GL_T2F_C4F_N3F_V3F = _gllib.GL_T2F_C4F_N3F_V3F
+GL_T4F_C4F_N3F_V4F = _gllib.GL_T4F_C4F_N3F_V4F
+GL_MATRIX_MODE = _gllib.GL_MATRIX_MODE
+GL_MODELVIEW = _gllib.GL_MODELVIEW
+GL_PROJECTION = _gllib.GL_PROJECTION
+GL_TEXTURE = _gllib.GL_TEXTURE
+GL_POINT_SMOOTH = _gllib.GL_POINT_SMOOTH
+GL_POINT_SIZE = _gllib.GL_POINT_SIZE
+GL_POINT_SIZE_GRANULARITY = _gllib.GL_POINT_SIZE_GRANULARITY
+GL_POINT_SIZE_RANGE = _gllib.GL_POINT_SIZE_RANGE
+GL_LINE_SMOOTH = _gllib.GL_LINE_SMOOTH
+GL_LINE_STIPPLE = _gllib.GL_LINE_STIPPLE
+GL_LINE_STIPPLE_PATTERN = _gllib.GL_LINE_STIPPLE_PATTERN
+GL_LINE_STIPPLE_REPEAT = _gllib.GL_LINE_STIPPLE_REPEAT
+GL_LINE_WIDTH = _gllib.GL_LINE_WIDTH
+GL_LINE_WIDTH_GRANULARITY = _gllib.GL_LINE_WIDTH_GRANULARITY
+GL_LINE_WIDTH_RANGE = _gllib.GL_LINE_WIDTH_RANGE
+GL_POINT = _gllib.GL_POINT
+GL_LINE = _gllib.GL_LINE
+GL_FILL = _gllib.GL_FILL
+GL_CW = _gllib.GL_CW
+GL_CCW = _gllib.GL_CCW
+GL_FRONT = _gllib.GL_FRONT
+GL_BACK = _gllib.GL_BACK
+GL_POLYGON_MODE = _gllib.GL_POLYGON_MODE
+GL_POLYGON_SMOOTH = _gllib.GL_POLYGON_SMOOTH
+GL_POLYGON_STIPPLE = _gllib.GL_POLYGON_STIPPLE
+GL_EDGE_FLAG = _gllib.GL_EDGE_FLAG
+GL_CULL_FACE = _gllib.GL_CULL_FACE
+GL_CULL_FACE_MODE = _gllib.GL_CULL_FACE_MODE
+GL_FRONT_FACE = _gllib.GL_FRONT_FACE
+GL_POLYGON_OFFSET_FACTOR = _gllib.GL_POLYGON_OFFSET_FACTOR
+GL_POLYGON_OFFSET_UNITS = _gllib.GL_POLYGON_OFFSET_UNITS
+GL_POLYGON_OFFSET_POINT = _gllib.GL_POLYGON_OFFSET_POINT
+GL_POLYGON_OFFSET_LINE = _gllib.GL_POLYGON_OFFSET_LINE
+GL_POLYGON_OFFSET_FILL = _gllib.GL_POLYGON_OFFSET_FILL
+GL_COMPILE = _gllib.GL_COMPILE
+GL_COMPILE_AND_EXECUTE = _gllib.GL_COMPILE_AND_EXECUTE
+GL_LIST_BASE = _gllib.GL_LIST_BASE
+GL_LIST_INDEX = _gllib.GL_LIST_INDEX
+GL_LIST_MODE = _gllib.GL_LIST_MODE
+GL_NEVER = _gllib.GL_NEVER
+GL_LESS = _gllib.GL_LESS
+GL_EQUAL = _gllib.GL_EQUAL
+GL_LEQUAL = _gllib.GL_LEQUAL
+GL_GREATER = _gllib.GL_GREATER
+GL_NOTEQUAL = _gllib.GL_NOTEQUAL
+GL_GEQUAL = _gllib.GL_GEQUAL
+GL_ALWAYS = _gllib.GL_ALWAYS
+GL_DEPTH_TEST = _gllib.GL_DEPTH_TEST
+GL_DEPTH_BITS = _gllib.GL_DEPTH_BITS
+GL_DEPTH_CLEAR_VALUE = _gllib.GL_DEPTH_CLEAR_VALUE
+GL_DEPTH_FUNC = _gllib.GL_DEPTH_FUNC
+GL_DEPTH_RANGE = _gllib.GL_DEPTH_RANGE
+GL_DEPTH_WRITEMASK = _gllib.GL_DEPTH_WRITEMASK
+GL_DEPTH_COMPONENT = _gllib.GL_DEPTH_COMPONENT
+GL_LIGHTING = _gllib.GL_LIGHTING
+GL_LIGHT0 = _gllib.GL_LIGHT0
+GL_LIGHT1 = _gllib.GL_LIGHT1
+GL_LIGHT2 = _gllib.GL_LIGHT2
+GL_LIGHT3 = _gllib.GL_LIGHT3
+GL_LIGHT4 = _gllib.GL_LIGHT4
+GL_LIGHT5 = _gllib.GL_LIGHT5
+GL_LIGHT6 = _gllib.GL_LIGHT6
+GL_LIGHT7 = _gllib.GL_LIGHT7
+GL_SPOT_EXPONENT = _gllib.GL_SPOT_EXPONENT
+GL_SPOT_CUTOFF = _gllib.GL_SPOT_CUTOFF
+GL_CONSTANT_ATTENUATION = _gllib.GL_CONSTANT_ATTENUATION
+GL_LINEAR_ATTENUATION = _gllib.GL_LINEAR_ATTENUATION
+GL_QUADRATIC_ATTENUATION = _gllib.GL_QUADRATIC_ATTENUATION
+GL_AMBIENT = _gllib.GL_AMBIENT
+GL_DIFFUSE = _gllib.GL_DIFFUSE
+GL_SPECULAR = _gllib.GL_SPECULAR
+GL_SHININESS = _gllib.GL_SHININESS
+GL_EMISSION = _gllib.GL_EMISSION
+GL_POSITION = _gllib.GL_POSITION
+GL_SPOT_DIRECTION = _gllib.GL_SPOT_DIRECTION
+GL_AMBIENT_AND_DIFFUSE = _gllib.GL_AMBIENT_AND_DIFFUSE
+GL_COLOR_INDEXES = _gllib.GL_COLOR_INDEXES
+GL_LIGHT_MODEL_TWO_SIDE = _gllib.GL_LIGHT_MODEL_TWO_SIDE
+GL_LIGHT_MODEL_LOCAL_VIEWER = _gllib.GL_LIGHT_MODEL_LOCAL_VIEWER
+GL_LIGHT_MODEL_AMBIENT = _gllib.GL_LIGHT_MODEL_AMBIENT
+GL_FRONT_AND_BACK = _gllib.GL_FRONT_AND_BACK
+GL_SHADE_MODEL = _gllib.GL_SHADE_MODEL
+GL_FLAT = _gllib.GL_FLAT
+GL_SMOOTH = _gllib.GL_SMOOTH
+GL_COLOR_MATERIAL = _gllib.GL_COLOR_MATERIAL
+GL_COLOR_MATERIAL_FACE = _gllib.GL_COLOR_MATERIAL_FACE
+GL_COLOR_MATERIAL_PARAMETER = _gllib.GL_COLOR_MATERIAL_PARAMETER
+GL_NORMALIZE = _gllib.GL_NORMALIZE
+GL_CLIP_PLANE0 = _gllib.GL_CLIP_PLANE0
+GL_CLIP_PLANE1 = _gllib.GL_CLIP_PLANE1
+GL_CLIP_PLANE2 = _gllib.GL_CLIP_PLANE2
+GL_CLIP_PLANE3 = _gllib.GL_CLIP_PLANE3
+GL_CLIP_PLANE4 = _gllib.GL_CLIP_PLANE4
+GL_CLIP_PLANE5 = _gllib.GL_CLIP_PLANE5
+GL_ACCUM_RED_BITS = _gllib.GL_ACCUM_RED_BITS
+GL_ACCUM_GREEN_BITS = _gllib.GL_ACCUM_GREEN_BITS
+GL_ACCUM_BLUE_BITS = _gllib.GL_ACCUM_BLUE_BITS
+GL_ACCUM_ALPHA_BITS = _gllib.GL_ACCUM_ALPHA_BITS
+GL_ACCUM_CLEAR_VALUE = _gllib.GL_ACCUM_CLEAR_VALUE
+GL_ACCUM = _gllib.GL_ACCUM
+GL_ADD = _gllib.GL_ADD
+GL_LOAD = _gllib.GL_LOAD
+GL_MULT = _gllib.GL_MULT
+GL_RETURN = _gllib.GL_RETURN
+GL_ALPHA_TEST = _gllib.GL_ALPHA_TEST
+GL_ALPHA_TEST_REF = _gllib.GL_ALPHA_TEST_REF
+GL_ALPHA_TEST_FUNC = _gllib.GL_ALPHA_TEST_FUNC
+GL_BLEND = _gllib.GL_BLEND
+GL_BLEND_SRC = _gllib.GL_BLEND_SRC
+GL_BLEND_DST = _gllib.GL_BLEND_DST
+GL_ZERO = _gllib.GL_ZERO
+GL_ONE = _gllib.GL_ONE
+GL_SRC_COLOR = _gllib.GL_SRC_COLOR
+GL_ONE_MINUS_SRC_COLOR = _gllib.GL_ONE_MINUS_SRC_COLOR
+GL_SRC_ALPHA = _gllib.GL_SRC_ALPHA
+GL_ONE_MINUS_SRC_ALPHA = _gllib.GL_ONE_MINUS_SRC_ALPHA
+GL_DST_ALPHA = _gllib.GL_DST_ALPHA
+GL_ONE_MINUS_DST_ALPHA = _gllib.GL_ONE_MINUS_DST_ALPHA
+GL_DST_COLOR = _gllib.GL_DST_COLOR
+GL_ONE_MINUS_DST_COLOR = _gllib.GL_ONE_MINUS_DST_COLOR
+GL_SRC_ALPHA_SATURATE = _gllib.GL_SRC_ALPHA_SATURATE
+GL_FEEDBACK = _gllib.GL_FEEDBACK
+GL_RENDER = _gllib.GL_RENDER
+GL_SELECT = _gllib.GL_SELECT
+GL_2D = _gllib.GL_2D
+GL_3D = _gllib.GL_3D
+GL_3D_COLOR = _gllib.GL_3D_COLOR
+GL_3D_COLOR_TEXTURE = _gllib.GL_3D_COLOR_TEXTURE
+GL_4D_COLOR_TEXTURE = _gllib.GL_4D_COLOR_TEXTURE
+GL_POINT_TOKEN = _gllib.GL_POINT_TOKEN
+GL_LINE_TOKEN = _gllib.GL_LINE_TOKEN
+GL_LINE_RESET_TOKEN = _gllib.GL_LINE_RESET_TOKEN
+GL_POLYGON_TOKEN = _gllib.GL_POLYGON_TOKEN
+GL_BITMAP_TOKEN = _gllib.GL_BITMAP_TOKEN
+GL_DRAW_PIXEL_TOKEN = _gllib.GL_DRAW_PIXEL_TOKEN
+GL_COPY_PIXEL_TOKEN = _gllib.GL_COPY_PIXEL_TOKEN
+GL_PASS_THROUGH_TOKEN = _gllib.GL_PASS_THROUGH_TOKEN
+GL_FEEDBACK_BUFFER_POINTER = _gllib.GL_FEEDBACK_BUFFER_POINTER
+GL_FEEDBACK_BUFFER_SIZE = _gllib.GL_FEEDBACK_BUFFER_SIZE
+GL_FEEDBACK_BUFFER_TYPE = _gllib.GL_FEEDBACK_BUFFER_TYPE
+GL_SELECTION_BUFFER_POINTER = _gllib.GL_SELECTION_BUFFER_POINTER
+GL_SELECTION_BUFFER_SIZE = _gllib.GL_SELECTION_BUFFER_SIZE
+GL_FOG = _gllib.GL_FOG
+GL_FOG_MODE = _gllib.GL_FOG_MODE
+GL_FOG_DENSITY = _gllib.GL_FOG_DENSITY
+GL_FOG_COLOR = _gllib.GL_FOG_COLOR
+GL_FOG_INDEX = _gllib.GL_FOG_INDEX
+GL_FOG_START = _gllib.GL_FOG_START
+GL_FOG_END = _gllib.GL_FOG_END
+GL_LINEAR = _gllib.GL_LINEAR
+GL_EXP = _gllib.GL_EXP
+GL_EXP2 = _gllib.GL_EXP2
+GL_LOGIC_OP = _gllib.GL_LOGIC_OP
+GL_INDEX_LOGIC_OP = _gllib.GL_INDEX_LOGIC_OP
+GL_COLOR_LOGIC_OP = _gllib.GL_COLOR_LOGIC_OP
+GL_LOGIC_OP_MODE = _gllib.GL_LOGIC_OP_MODE
+GL_CLEAR = _gllib.GL_CLEAR
+GL_SET = _gllib.GL_SET
+GL_COPY = _gllib.GL_COPY
+GL_COPY_INVERTED = _gllib.GL_COPY_INVERTED
+GL_NOOP = _gllib.GL_NOOP
+GL_INVERT = _gllib.GL_INVERT
+GL_AND = _gllib.GL_AND
+GL_NAND = _gllib.GL_NAND
+GL_OR = _gllib.GL_OR
+GL_NOR = _gllib.GL_NOR
+GL_XOR = _gllib.GL_XOR
+GL_EQUIV = _gllib.GL_EQUIV
+GL_AND_REVERSE = _gllib.GL_AND_REVERSE
+GL_AND_INVERTED = _gllib.GL_AND_INVERTED
+GL_OR_REVERSE = _gllib.GL_OR_REVERSE
+GL_OR_INVERTED = _gllib.GL_OR_INVERTED
+GL_STENCIL_BITS = _gllib.GL_STENCIL_BITS
+GL_STENCIL_TEST = _gllib.GL_STENCIL_TEST
+GL_STENCIL_CLEAR_VALUE = _gllib.GL_STENCIL_CLEAR_VALUE
+GL_STENCIL_FUNC = _gllib.GL_STENCIL_FUNC
+GL_STENCIL_VALUE_MASK = _gllib.GL_STENCIL_VALUE_MASK
+GL_STENCIL_FAIL = _gllib.GL_STENCIL_FAIL
+GL_STENCIL_PASS_DEPTH_FAIL = _gllib.GL_STENCIL_PASS_DEPTH_FAIL
+GL_STENCIL_PASS_DEPTH_PASS = _gllib.GL_STENCIL_PASS_DEPTH_PASS
+GL_STENCIL_REF = _gllib.GL_STENCIL_REF
+GL_STENCIL_WRITEMASK = _gllib.GL_STENCIL_WRITEMASK
+GL_STENCIL_INDEX = _gllib.GL_STENCIL_INDEX
+GL_KEEP = _gllib.GL_KEEP
+GL_REPLACE = _gllib.GL_REPLACE
+GL_INCR = _gllib.GL_INCR
+GL_DECR = _gllib.GL_DECR
+GL_NONE = _gllib.GL_NONE
+GL_LEFT = _gllib.GL_LEFT
+GL_RIGHT = _gllib.GL_RIGHT
+GL_FRONT_LEFT = _gllib.GL_FRONT_LEFT
+GL_FRONT_RIGHT = _gllib.GL_FRONT_RIGHT
+GL_BACK_LEFT = _gllib.GL_BACK_LEFT
+GL_BACK_RIGHT = _gllib.GL_BACK_RIGHT
+GL_AUX0 = _gllib.GL_AUX0
+GL_AUX1 = _gllib.GL_AUX1
+GL_AUX2 = _gllib.GL_AUX2
+GL_AUX3 = _gllib.GL_AUX3
+GL_COLOR_INDEX = _gllib.GL_COLOR_INDEX
+GL_RED = _gllib.GL_RED
+GL_GREEN = _gllib.GL_GREEN
+GL_BLUE = _gllib.GL_BLUE
+GL_ALPHA = _gllib.GL_ALPHA
+GL_LUMINANCE = _gllib.GL_LUMINANCE
+GL_LUMINANCE_ALPHA = _gllib.GL_LUMINANCE_ALPHA
+GL_ALPHA_BITS = _gllib.GL_ALPHA_BITS
+GL_RED_BITS = _gllib.GL_RED_BITS
+GL_GREEN_BITS = _gllib.GL_GREEN_BITS
+GL_BLUE_BITS = _gllib.GL_BLUE_BITS
+GL_INDEX_BITS = _gllib.GL_INDEX_BITS
+GL_SUBPIXEL_BITS = _gllib.GL_SUBPIXEL_BITS
+GL_AUX_BUFFERS = _gllib.GL_AUX_BUFFERS
+GL_READ_BUFFER = _gllib.GL_READ_BUFFER
+GL_DRAW_BUFFER = _gllib.GL_DRAW_BUFFER
+GL_DOUBLEBUFFER = _gllib.GL_DOUBLEBUFFER
+GL_STEREO = _gllib.GL_STEREO
+GL_BITMAP = _gllib.GL_BITMAP
+GL_COLOR = _gllib.GL_COLOR
+GL_DEPTH = _gllib.GL_DEPTH
+GL_STENCIL = _gllib.GL_STENCIL
+GL_DITHER = _gllib.GL_DITHER
+GL_RGB = _gllib.GL_RGB
+GL_RGBA = _gllib.GL_RGBA
+GL_MAX_LIST_NESTING = _gllib.GL_MAX_LIST_NESTING
+GL_MAX_EVAL_ORDER = _gllib.GL_MAX_EVAL_ORDER
+GL_MAX_LIGHTS = _gllib.GL_MAX_LIGHTS
+GL_MAX_CLIP_PLANES = _gllib.GL_MAX_CLIP_PLANES
+GL_MAX_TEXTURE_SIZE = _gllib.GL_MAX_TEXTURE_SIZE
+GL_MAX_PIXEL_MAP_TABLE = _gllib.GL_MAX_PIXEL_MAP_TABLE
+GL_MAX_ATTRIB_STACK_DEPTH = _gllib.GL_MAX_ATTRIB_STACK_DEPTH
+GL_MAX_MODELVIEW_STACK_DEPTH = _gllib.GL_MAX_MODELVIEW_STACK_DEPTH
+GL_MAX_NAME_STACK_DEPTH = _gllib.GL_MAX_NAME_STACK_DEPTH
+GL_MAX_PROJECTION_STACK_DEPTH = _gllib.GL_MAX_PROJECTION_STACK_DEPTH
+GL_MAX_TEXTURE_STACK_DEPTH = _gllib.GL_MAX_TEXTURE_STACK_DEPTH
+GL_MAX_VIEWPORT_DIMS = _gllib.GL_MAX_VIEWPORT_DIMS
+GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = _gllib.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
+GL_ATTRIB_STACK_DEPTH = _gllib.GL_ATTRIB_STACK_DEPTH
+GL_CLIENT_ATTRIB_STACK_DEPTH = _gllib.GL_CLIENT_ATTRIB_STACK_DEPTH
+GL_COLOR_CLEAR_VALUE = _gllib.GL_COLOR_CLEAR_VALUE
+GL_COLOR_WRITEMASK = _gllib.GL_COLOR_WRITEMASK
+GL_CURRENT_INDEX = _gllib.GL_CURRENT_INDEX
+GL_CURRENT_COLOR = _gllib.GL_CURRENT_COLOR
+GL_CURRENT_NORMAL = _gllib.GL_CURRENT_NORMAL
+GL_CURRENT_RASTER_COLOR = _gllib.GL_CURRENT_RASTER_COLOR
+GL_CURRENT_RASTER_DISTANCE = _gllib.GL_CURRENT_RASTER_DISTANCE
+GL_CURRENT_RASTER_INDEX = _gllib.GL_CURRENT_RASTER_INDEX
+GL_CURRENT_RASTER_POSITION = _gllib.GL_CURRENT_RASTER_POSITION
+GL_CURRENT_RASTER_TEXTURE_COORDS = _gllib.GL_CURRENT_RASTER_TEXTURE_COORDS
+GL_CURRENT_RASTER_POSITION_VALID = _gllib.GL_CURRENT_RASTER_POSITION_VALID
+GL_CURRENT_TEXTURE_COORDS = _gllib.GL_CURRENT_TEXTURE_COORDS
+GL_INDEX_CLEAR_VALUE = _gllib.GL_INDEX_CLEAR_VALUE
+GL_INDEX_MODE = _gllib.GL_INDEX_MODE
+GL_INDEX_WRITEMASK = _gllib.GL_INDEX_WRITEMASK
+GL_MODELVIEW_MATRIX = _gllib.GL_MODELVIEW_MATRIX
+GL_MODELVIEW_STACK_DEPTH = _gllib.GL_MODELVIEW_STACK_DEPTH
+GL_NAME_STACK_DEPTH = _gllib.GL_NAME_STACK_DEPTH
+GL_PROJECTION_MATRIX = _gllib.GL_PROJECTION_MATRIX
+GL_PROJECTION_STACK_DEPTH = _gllib.GL_PROJECTION_STACK_DEPTH
+GL_RENDER_MODE = _gllib.GL_RENDER_MODE
+GL_RGBA_MODE = _gllib.GL_RGBA_MODE
+GL_TEXTURE_MATRIX = _gllib.GL_TEXTURE_MATRIX
+GL_TEXTURE_STACK_DEPTH = _gllib.GL_TEXTURE_STACK_DEPTH
+GL_VIEWPORT = _gllib.GL_VIEWPORT
+GL_AUTO_NORMAL = _gllib.GL_AUTO_NORMAL
+GL_MAP1_COLOR_4 = _gllib.GL_MAP1_COLOR_4
+GL_MAP1_INDEX = _gllib.GL_MAP1_INDEX
+GL_MAP1_NORMAL = _gllib.GL_MAP1_NORMAL
+GL_MAP1_TEXTURE_COORD_1 = _gllib.GL_MAP1_TEXTURE_COORD_1
+GL_MAP1_TEXTURE_COORD_2 = _gllib.GL_MAP1_TEXTURE_COORD_2
+GL_MAP1_TEXTURE_COORD_3 = _gllib.GL_MAP1_TEXTURE_COORD_3
+GL_MAP1_TEXTURE_COORD_4 = _gllib.GL_MAP1_TEXTURE_COORD_4
+GL_MAP1_VERTEX_3 = _gllib.GL_MAP1_VERTEX_3
+GL_MAP1_VERTEX_4 = _gllib.GL_MAP1_VERTEX_4
+GL_MAP2_COLOR_4 = _gllib.GL_MAP2_COLOR_4
+GL_MAP2_INDEX = _gllib.GL_MAP2_INDEX
+GL_MAP2_NORMAL = _gllib.GL_MAP2_NORMAL
+GL_MAP2_TEXTURE_COORD_1 = _gllib.GL_MAP2_TEXTURE_COORD_1
+GL_MAP2_TEXTURE_COORD_2 = _gllib.GL_MAP2_TEXTURE_COORD_2
+GL_MAP2_TEXTURE_COORD_3 = _gllib.GL_MAP2_TEXTURE_COORD_3
+GL_MAP2_TEXTURE_COORD_4 = _gllib.GL_MAP2_TEXTURE_COORD_4
+GL_MAP2_VERTEX_3 = _gllib.GL_MAP2_VERTEX_3
+GL_MAP2_VERTEX_4 = _gllib.GL_MAP2_VERTEX_4
+GL_MAP1_GRID_DOMAIN = _gllib.GL_MAP1_GRID_DOMAIN
+GL_MAP1_GRID_SEGMENTS = _gllib.GL_MAP1_GRID_SEGMENTS
+GL_MAP2_GRID_DOMAIN = _gllib.GL_MAP2_GRID_DOMAIN
+GL_MAP2_GRID_SEGMENTS = _gllib.GL_MAP2_GRID_SEGMENTS
+GL_COEFF = _gllib.GL_COEFF
+GL_ORDER = _gllib.GL_ORDER
+GL_DOMAIN = _gllib.GL_DOMAIN
+GL_PERSPECTIVE_CORRECTION_HINT = _gllib.GL_PERSPECTIVE_CORRECTION_HINT
+GL_POINT_SMOOTH_HINT = _gllib.GL_POINT_SMOOTH_HINT
+GL_LINE_SMOOTH_HINT = _gllib.GL_LINE_SMOOTH_HINT
+GL_POLYGON_SMOOTH_HINT = _gllib.GL_POLYGON_SMOOTH_HINT
+GL_FOG_HINT = _gllib.GL_FOG_HINT
+GL_DONT_CARE = _gllib.GL_DONT_CARE
+GL_FASTEST = _gllib.GL_FASTEST
+GL_NICEST = _gllib.GL_NICEST
+GL_SCISSOR_BOX = _gllib.GL_SCISSOR_BOX
+GL_SCISSOR_TEST = _gllib.GL_SCISSOR_TEST
+GL_MAP_COLOR = _gllib.GL_MAP_COLOR
+GL_MAP_STENCIL = _gllib.GL_MAP_STENCIL
+GL_INDEX_SHIFT = _gllib.GL_INDEX_SHIFT
+GL_INDEX_OFFSET = _gllib.GL_INDEX_OFFSET
+GL_RED_SCALE = _gllib.GL_RED_SCALE
+GL_RED_BIAS = _gllib.GL_RED_BIAS
+GL_GREEN_SCALE = _gllib.GL_GREEN_SCALE
+GL_GREEN_BIAS = _gllib.GL_GREEN_BIAS
+GL_BLUE_SCALE = _gllib.GL_BLUE_SCALE
+GL_BLUE_BIAS = _gllib.GL_BLUE_BIAS
+GL_ALPHA_SCALE = _gllib.GL_ALPHA_SCALE
+GL_ALPHA_BIAS = _gllib.GL_ALPHA_BIAS
+GL_DEPTH_SCALE = _gllib.GL_DEPTH_SCALE
+GL_DEPTH_BIAS = _gllib.GL_DEPTH_BIAS
+GL_PIXEL_MAP_S_TO_S_SIZE = _gllib.GL_PIXEL_MAP_S_TO_S_SIZE
+GL_PIXEL_MAP_I_TO_I_SIZE = _gllib.GL_PIXEL_MAP_I_TO_I_SIZE
+GL_PIXEL_MAP_I_TO_R_SIZE = _gllib.GL_PIXEL_MAP_I_TO_R_SIZE
+GL_PIXEL_MAP_I_TO_G_SIZE = _gllib.GL_PIXEL_MAP_I_TO_G_SIZE
+GL_PIXEL_MAP_I_TO_B_SIZE = _gllib.GL_PIXEL_MAP_I_TO_B_SIZE
+GL_PIXEL_MAP_I_TO_A_SIZE = _gllib.GL_PIXEL_MAP_I_TO_A_SIZE
+GL_PIXEL_MAP_R_TO_R_SIZE = _gllib.GL_PIXEL_MAP_R_TO_R_SIZE
+GL_PIXEL_MAP_G_TO_G_SIZE = _gllib.GL_PIXEL_MAP_G_TO_G_SIZE
+GL_PIXEL_MAP_B_TO_B_SIZE = _gllib.GL_PIXEL_MAP_B_TO_B_SIZE
+GL_PIXEL_MAP_A_TO_A_SIZE = _gllib.GL_PIXEL_MAP_A_TO_A_SIZE
+GL_PIXEL_MAP_S_TO_S = _gllib.GL_PIXEL_MAP_S_TO_S
+GL_PIXEL_MAP_I_TO_I = _gllib.GL_PIXEL_MAP_I_TO_I
+GL_PIXEL_MAP_I_TO_R = _gllib.GL_PIXEL_MAP_I_TO_R
+GL_PIXEL_MAP_I_TO_G = _gllib.GL_PIXEL_MAP_I_TO_G
+GL_PIXEL_MAP_I_TO_B = _gllib.GL_PIXEL_MAP_I_TO_B
+GL_PIXEL_MAP_I_TO_A = _gllib.GL_PIXEL_MAP_I_TO_A
+GL_PIXEL_MAP_R_TO_R = _gllib.GL_PIXEL_MAP_R_TO_R
+GL_PIXEL_MAP_G_TO_G = _gllib.GL_PIXEL_MAP_G_TO_G
+GL_PIXEL_MAP_B_TO_B = _gllib.GL_PIXEL_MAP_B_TO_B
+GL_PIXEL_MAP_A_TO_A = _gllib.GL_PIXEL_MAP_A_TO_A
+GL_PACK_ALIGNMENT = _gllib.GL_PACK_ALIGNMENT
+GL_PACK_LSB_FIRST = _gllib.GL_PACK_LSB_FIRST
+GL_PACK_ROW_LENGTH = _gllib.GL_PACK_ROW_LENGTH
+GL_PACK_SKIP_PIXELS = _gllib.GL_PACK_SKIP_PIXELS
+GL_PACK_SKIP_ROWS = _gllib.GL_PACK_SKIP_ROWS
+GL_PACK_SWAP_BYTES = _gllib.GL_PACK_SWAP_BYTES
+GL_UNPACK_ALIGNMENT = _gllib.GL_UNPACK_ALIGNMENT
+GL_UNPACK_LSB_FIRST = _gllib.GL_UNPACK_LSB_FIRST
+GL_UNPACK_ROW_LENGTH = _gllib.GL_UNPACK_ROW_LENGTH
+GL_UNPACK_SKIP_PIXELS = _gllib.GL_UNPACK_SKIP_PIXELS
+GL_UNPACK_SKIP_ROWS = _gllib.GL_UNPACK_SKIP_ROWS
+GL_UNPACK_SWAP_BYTES = _gllib.GL_UNPACK_SWAP_BYTES
+GL_ZOOM_X = _gllib.GL_ZOOM_X
+GL_ZOOM_Y = _gllib.GL_ZOOM_Y
+GL_TEXTURE_ENV = _gllib.GL_TEXTURE_ENV
+GL_TEXTURE_ENV_MODE = _gllib.GL_TEXTURE_ENV_MODE
+GL_TEXTURE_1D = _gllib.GL_TEXTURE_1D
+GL_TEXTURE_2D = _gllib.GL_TEXTURE_2D
+GL_TEXTURE_WRAP_S = _gllib.GL_TEXTURE_WRAP_S
+GL_TEXTURE_WRAP_T = _gllib.GL_TEXTURE_WRAP_T
+GL_TEXTURE_MAG_FILTER = _gllib.GL_TEXTURE_MAG_FILTER
+GL_TEXTURE_MIN_FILTER = _gllib.GL_TEXTURE_MIN_FILTER
+GL_TEXTURE_ENV_COLOR = _gllib.GL_TEXTURE_ENV_COLOR
+GL_TEXTURE_GEN_S = _gllib.GL_TEXTURE_GEN_S
+GL_TEXTURE_GEN_T = _gllib.GL_TEXTURE_GEN_T
+GL_TEXTURE_GEN_MODE = _gllib.GL_TEXTURE_GEN_MODE
+GL_TEXTURE_BORDER_COLOR = _gllib.GL_TEXTURE_BORDER_COLOR
+GL_TEXTURE_WIDTH = _gllib.GL_TEXTURE_WIDTH
+GL_TEXTURE_HEIGHT = _gllib.GL_TEXTURE_HEIGHT
+GL_TEXTURE_BORDER = _gllib.GL_TEXTURE_BORDER
+GL_TEXTURE_COMPONENTS = _gllib.GL_TEXTURE_COMPONENTS
+GL_TEXTURE_RED_SIZE = _gllib.GL_TEXTURE_RED_SIZE
+GL_TEXTURE_GREEN_SIZE = _gllib.GL_TEXTURE_GREEN_SIZE
+GL_TEXTURE_BLUE_SIZE = _gllib.GL_TEXTURE_BLUE_SIZE
+GL_TEXTURE_ALPHA_SIZE = _gllib.GL_TEXTURE_ALPHA_SIZE
+GL_TEXTURE_LUMINANCE_SIZE = _gllib.GL_TEXTURE_LUMINANCE_SIZE
+GL_TEXTURE_INTENSITY_SIZE = _gllib.GL_TEXTURE_INTENSITY_SIZE
+GL_NEAREST_MIPMAP_NEAREST = _gllib.GL_NEAREST_MIPMAP_NEAREST
+GL_NEAREST_MIPMAP_LINEAR = _gllib.GL_NEAREST_MIPMAP_LINEAR
+GL_LINEAR_MIPMAP_NEAREST = _gllib.GL_LINEAR_MIPMAP_NEAREST
+GL_LINEAR_MIPMAP_LINEAR = _gllib.GL_LINEAR_MIPMAP_LINEAR
+GL_OBJECT_LINEAR = _gllib.GL_OBJECT_LINEAR
+GL_OBJECT_PLANE = _gllib.GL_OBJECT_PLANE
+GL_EYE_LINEAR = _gllib.GL_EYE_LINEAR
+GL_EYE_PLANE = _gllib.GL_EYE_PLANE
+GL_SPHERE_MAP = _gllib.GL_SPHERE_MAP
+GL_DECAL = _gllib.GL_DECAL
+GL_MODULATE = _gllib.GL_MODULATE
+GL_NEAREST = _gllib.GL_NEAREST
+GL_REPEAT = _gllib.GL_REPEAT
+GL_CLAMP = _gllib.GL_CLAMP
+GL_S = _gllib.GL_S
+GL_T = _gllib.GL_T
+GL_R = _gllib.GL_R
+GL_Q = _gllib.GL_Q
+GL_TEXTURE_GEN_R = _gllib.GL_TEXTURE_GEN_R
+GL_TEXTURE_GEN_Q = _gllib.GL_TEXTURE_GEN_Q
+GL_VENDOR = _gllib.GL_VENDOR
+GL_RENDERER = _gllib.GL_RENDERER
+GL_VERSION = _gllib.GL_VERSION
+GL_EXTENSIONS = _gllib.GL_EXTENSIONS
+GL_NO_ERROR = _gllib.GL_NO_ERROR
+GL_INVALID_ENUM = _gllib.GL_INVALID_ENUM
+GL_INVALID_VALUE = _gllib.GL_INVALID_VALUE
+GL_INVALID_OPERATION = _gllib.GL_INVALID_OPERATION
+GL_STACK_OVERFLOW = _gllib.GL_STACK_OVERFLOW
+GL_STACK_UNDERFLOW = _gllib.GL_STACK_UNDERFLOW
+GL_OUT_OF_MEMORY = _gllib.GL_OUT_OF_MEMORY
+GL_CURRENT_BIT = _gllib.GL_CURRENT_BIT
+GL_POINT_BIT = _gllib.GL_POINT_BIT
+GL_LINE_BIT = _gllib.GL_LINE_BIT
+GL_POLYGON_BIT = _gllib.GL_POLYGON_BIT
+GL_POLYGON_STIPPLE_BIT = _gllib.GL_POLYGON_STIPPLE_BIT
+GL_PIXEL_MODE_BIT = _gllib.GL_PIXEL_MODE_BIT
+GL_LIGHTING_BIT = _gllib.GL_LIGHTING_BIT
+GL_FOG_BIT = _gllib.GL_FOG_BIT
+GL_DEPTH_BUFFER_BIT = _gllib.GL_DEPTH_BUFFER_BIT
+GL_ACCUM_BUFFER_BIT = _gllib.GL_ACCUM_BUFFER_BIT
+GL_STENCIL_BUFFER_BIT = _gllib.GL_STENCIL_BUFFER_BIT
+GL_VIEWPORT_BIT = _gllib.GL_VIEWPORT_BIT
+GL_TRANSFORM_BIT = _gllib.GL_TRANSFORM_BIT
+GL_ENABLE_BIT = _gllib.GL_ENABLE_BIT
+GL_COLOR_BUFFER_BIT = _gllib.GL_COLOR_BUFFER_BIT
+GL_HINT_BIT = _gllib.GL_HINT_BIT
+GL_EVAL_BIT = _gllib.GL_EVAL_BIT
+GL_LIST_BIT = _gllib.GL_LIST_BIT
+GL_TEXTURE_BIT = _gllib.GL_TEXTURE_BIT
+GL_SCISSOR_BIT = _gllib.GL_SCISSOR_BIT
+GL_ALL_ATTRIB_BITS = _gllib.GL_ALL_ATTRIB_BITS
+GL_PROXY_TEXTURE_1D = _gllib.GL_PROXY_TEXTURE_1D
+GL_PROXY_TEXTURE_2D = _gllib.GL_PROXY_TEXTURE_2D
+GL_TEXTURE_PRIORITY = _gllib.GL_TEXTURE_PRIORITY
+GL_TEXTURE_RESIDENT = _gllib.GL_TEXTURE_RESIDENT
+GL_TEXTURE_BINDING_1D = _gllib.GL_TEXTURE_BINDING_1D
+GL_TEXTURE_BINDING_2D = _gllib.GL_TEXTURE_BINDING_2D
+GL_TEXTURE_INTERNAL_FORMAT = _gllib.GL_TEXTURE_INTERNAL_FORMAT
+GL_ALPHA4 = _gllib.GL_ALPHA4
+GL_ALPHA8 = _gllib.GL_ALPHA8
+GL_ALPHA12 = _gllib.GL_ALPHA12
+GL_ALPHA16 = _gllib.GL_ALPHA16
+GL_LUMINANCE4 = _gllib.GL_LUMINANCE4
+GL_LUMINANCE8 = _gllib.GL_LUMINANCE8
+GL_LUMINANCE12 = _gllib.GL_LUMINANCE12
+GL_LUMINANCE16 = _gllib.GL_LUMINANCE16
+GL_LUMINANCE4_ALPHA4 = _gllib.GL_LUMINANCE4_ALPHA4
+GL_LUMINANCE6_ALPHA2 = _gllib.GL_LUMINANCE6_ALPHA2
+GL_LUMINANCE8_ALPHA8 = _gllib.GL_LUMINANCE8_ALPHA8
+GL_LUMINANCE12_ALPHA4 = _gllib.GL_LUMINANCE12_ALPHA4
+GL_LUMINANCE12_ALPHA12 = _gllib.GL_LUMINANCE12_ALPHA12
+GL_LUMINANCE16_ALPHA16 = _gllib.GL_LUMINANCE16_ALPHA16
+GL_INTENSITY = _gllib.GL_INTENSITY
+GL_INTENSITY4 = _gllib.GL_INTENSITY4
+GL_INTENSITY8 = _gllib.GL_INTENSITY8
+GL_INTENSITY12 = _gllib.GL_INTENSITY12
+GL_INTENSITY16 = _gllib.GL_INTENSITY16
+GL_R3_G3_B2 = _gllib.GL_R3_G3_B2
+GL_RGB4 = _gllib.GL_RGB4
+GL_RGB5 = _gllib.GL_RGB5
+GL_RGB8 = _gllib.GL_RGB8
+GL_RGB10 = _gllib.GL_RGB10
+GL_RGB12 = _gllib.GL_RGB12
+GL_RGB16 = _gllib.GL_RGB16
+GL_RGBA2 = _gllib.GL_RGBA2
+GL_RGBA4 = _gllib.GL_RGBA4
+GL_RGB5_A1 = _gllib.GL_RGB5_A1
+GL_RGBA8 = _gllib.GL_RGBA8
+GL_RGB10_A2 = _gllib.GL_RGB10_A2
+GL_RGBA12 = _gllib.GL_RGBA12
+GL_RGBA16 = _gllib.GL_RGBA16
+GL_CLIENT_PIXEL_STORE_BIT = _gllib.GL_CLIENT_PIXEL_STORE_BIT
+GL_CLIENT_VERTEX_ARRAY_BIT = _gllib.GL_CLIENT_VERTEX_ARRAY_BIT
+GL_ALL_CLIENT_ATTRIB_BITS = _gllib.GL_ALL_CLIENT_ATTRIB_BITS
+GL_CLIENT_ALL_ATTRIB_BITS = _gllib.GL_CLIENT_ALL_ATTRIB_BITS
+glClearIndex = _gllib.glClearIndex
+glClearColor = _gllib.glClearColor
+glClear = _gllib.glClear
+glIndexMask = _gllib.glIndexMask
+glColorMask = _gllib.glColorMask
+glAlphaFunc = _gllib.glAlphaFunc
+glBlendFunc = _gllib.glBlendFunc
+glLogicOp = _gllib.glLogicOp
+glCullFace = _gllib.glCullFace
+glFrontFace = _gllib.glFrontFace
+glPointSize = _gllib.glPointSize
+glLineWidth = _gllib.glLineWidth
+glLineStipple = _gllib.glLineStipple
+glPolygonMode = _gllib.glPolygonMode
+glPolygonOffset = _gllib.glPolygonOffset
+glPolygonStipple = _gllib.glPolygonStipple
+glGetPolygonStipple = _gllib.glGetPolygonStipple
+glEdgeFlag = _gllib.glEdgeFlag
+glEdgeFlagv = _gllib.glEdgeFlagv
+glScissor = _gllib.glScissor
+glClipPlane = _gllib.glClipPlane
+glGetClipPlane = _gllib.glGetClipPlane
+glDrawBuffer = _gllib.glDrawBuffer
+glReadBuffer = _gllib.glReadBuffer
+glEnable = _gllib.glEnable
+glDisable = _gllib.glDisable
+glIsEnabled = _gllib.glIsEnabled
+glEnableClientState = _gllib.glEnableClientState
+glDisableClientState = _gllib.glDisableClientState
+glGetBooleanv = _gllib.glGetBooleanv
+glGetDoublev = _gllib.glGetDoublev
+glGetFloatv = _gllib.glGetFloatv
+glGetIntegerv = _gllib.glGetIntegerv
+glPushAttrib = _gllib.glPushAttrib
+glPopAttrib = _gllib.glPopAttrib
+glPushClientAttrib = _gllib.glPushClientAttrib
+glPopClientAttrib = _gllib.glPopClientAttrib
+glRenderMode = _gllib.glRenderMode
+glFinish = _gllib.glFinish
+glFlush = _gllib.glFlush
+glHint = _gllib.glHint
+glClearDepth = _gllib.glClearDepth
+glDepthFunc = _gllib.glDepthFunc
+glDepthMask = _gllib.glDepthMask
+glDepthRange = _gllib.glDepthRange
+glClearAccum = _gllib.glClearAccum
+glAccum = _gllib.glAccum
+glMatrixMode = _gllib.glMatrixMode
+glOrtho = _gllib.glOrtho
+glFrustum = _gllib.glFrustum
+glViewport = _gllib.glViewport
+glPushMatrix = _gllib.glPushMatrix
+glPopMatrix = _gllib.glPopMatrix
+glLoadIdentity = _gllib.glLoadIdentity
+glLoadMatrixd = _gllib.glLoadMatrixd
+glLoadMatrixf = _gllib.glLoadMatrixf
+glMultMatrixd = _gllib.glMultMatrixd
+glMultMatrixf = _gllib.glMultMatrixf
+glRotated = _gllib.glRotated
+glRotatef = _gllib.glRotatef
+glScaled = _gllib.glScaled
+glScalef = _gllib.glScalef
+glTranslated = _gllib.glTranslated
+glTranslatef = _gllib.glTranslatef
+glIsList = _gllib.glIsList
+glDeleteLists = _gllib.glDeleteLists
+glGenLists = _gllib.glGenLists
+glNewList = _gllib.glNewList
+glEndList = _gllib.glEndList
+glCallList = _gllib.glCallList
+glCallLists = _gllib.glCallLists
+glListBase = _gllib.glListBase
+glVertex2d = _gllib.glVertex2d
+glVertex2f = _gllib.glVertex2f
+glVertex2i = _gllib.glVertex2i
+glVertex2s = _gllib.glVertex2s
+glVertex3d = _gllib.glVertex3d
+glVertex3f = _gllib.glVertex3f
+glVertex3i = _gllib.glVertex3i
+glVertex3s = _gllib.glVertex3s
+glVertex4d = _gllib.glVertex4d
+glVertex4f = _gllib.glVertex4f
+glVertex4i = _gllib.glVertex4i
+glVertex4s = _gllib.glVertex4s
+glVertex2dv = _gllib.glVertex2dv
+glVertex2fv = _gllib.glVertex2fv
+glVertex2iv = _gllib.glVertex2iv
+glVertex2sv = _gllib.glVertex2sv
+glVertex3dv = _gllib.glVertex3dv
+glVertex3fv = _gllib.glVertex3fv
+glVertex3iv = _gllib.glVertex3iv
+glVertex3sv = _gllib.glVertex3sv
+glVertex4dv = _gllib.glVertex4dv
+glVertex4fv = _gllib.glVertex4fv
+glVertex4iv = _gllib.glVertex4iv
+glVertex4sv = _gllib.glVertex4sv
+glNormal3b = _gllib.glNormal3b
+glNormal3d = _gllib.glNormal3d
+glNormal3f = _gllib.glNormal3f
+glNormal3i = _gllib.glNormal3i
+glNormal3s = _gllib.glNormal3s
+glNormal3bv = _gllib.glNormal3bv
+glNormal3dv = _gllib.glNormal3dv
+glNormal3fv = _gllib.glNormal3fv
+glNormal3iv = _gllib.glNormal3iv
+glNormal3sv = _gllib.glNormal3sv
+glIndexd = _gllib.glIndexd
+glIndexf = _gllib.glIndexf
+glIndexi = _gllib.glIndexi
+glIndexs = _gllib.glIndexs
+glIndexub = _gllib.glIndexub
+glIndexdv = _gllib.glIndexdv
+glIndexfv = _gllib.glIndexfv
+glIndexiv = _gllib.glIndexiv
+glIndexsv = _gllib.glIndexsv
+glIndexubv = _gllib.glIndexubv
+glColor3b = _gllib.glColor3b
+glColor3d = _gllib.glColor3d
+glColor3f = _gllib.glColor3f
+glColor3i = _gllib.glColor3i
+glColor3s = _gllib.glColor3s
+glColor3ub = _gllib.glColor3ub
+glColor3ui = _gllib.glColor3ui
+glColor3us = _gllib.glColor3us
+glColor4b = _gllib.glColor4b
+glColor4d = _gllib.glColor4d
+glColor4f = _gllib.glColor4f
+glColor4i = _gllib.glColor4i
+glColor4s = _gllib.glColor4s
+glColor4ub = _gllib.glColor4ub
+glColor4ui = _gllib.glColor4ui
+glColor4us = _gllib.glColor4us
+glColor3bv = _gllib.glColor3bv
+glColor3dv = _gllib.glColor3dv
+glColor3fv = _gllib.glColor3fv
+glColor3iv = _gllib.glColor3iv
+glColor3sv = _gllib.glColor3sv
+glColor3ubv = _gllib.glColor3ubv
+glColor3uiv = _gllib.glColor3uiv
+glColor3usv = _gllib.glColor3usv
+glColor4bv = _gllib.glColor4bv
+glColor4dv = _gllib.glColor4dv
+glColor4fv = _gllib.glColor4fv
+glColor4iv = _gllib.glColor4iv
+glColor4sv = _gllib.glColor4sv
+glColor4ubv = _gllib.glColor4ubv
+glColor4uiv = _gllib.glColor4uiv
+glColor4usv = _gllib.glColor4usv
+glTexCoord1d = _gllib.glTexCoord1d
+glTexCoord1f = _gllib.glTexCoord1f
+glTexCoord1i = _gllib.glTexCoord1i
+glTexCoord1s = _gllib.glTexCoord1s
+glTexCoord2d = _gllib.glTexCoord2d
+glTexCoord2f = _gllib.glTexCoord2f
+glTexCoord2i = _gllib.glTexCoord2i
+glTexCoord2s = _gllib.glTexCoord2s
+glTexCoord3d = _gllib.glTexCoord3d
+glTexCoord3f = _gllib.glTexCoord3f
+glTexCoord3i = _gllib.glTexCoord3i
+glTexCoord3s = _gllib.glTexCoord3s
+glTexCoord4d = _gllib.glTexCoord4d
+glTexCoord4f = _gllib.glTexCoord4f
+glTexCoord4i = _gllib.glTexCoord4i
+glTexCoord4s = _gllib.glTexCoord4s
+glTexCoord1dv = _gllib.glTexCoord1dv
+glTexCoord1fv = _gllib.glTexCoord1fv
+glTexCoord1iv = _gllib.glTexCoord1iv
+glTexCoord1sv = _gllib.glTexCoord1sv
+glTexCoord2dv = _gllib.glTexCoord2dv
+glTexCoord2fv = _gllib.glTexCoord2fv
+glTexCoord2iv = _gllib.glTexCoord2iv
+glTexCoord2sv = _gllib.glTexCoord2sv
+glTexCoord3dv = _gllib.glTexCoord3dv
+glTexCoord3fv = _gllib.glTexCoord3fv
+glTexCoord3iv = _gllib.glTexCoord3iv
+glTexCoord3sv = _gllib.glTexCoord3sv
+glTexCoord4dv = _gllib.glTexCoord4dv
+glTexCoord4fv = _gllib.glTexCoord4fv
+glTexCoord4iv = _gllib.glTexCoord4iv
+glTexCoord4sv = _gllib.glTexCoord4sv
+glRasterPos2d = _gllib.glRasterPos2d
+glRasterPos2f = _gllib.glRasterPos2f
+glRasterPos2i = _gllib.glRasterPos2i
+glRasterPos2s = _gllib.glRasterPos2s
+glRasterPos3d = _gllib.glRasterPos3d
+glRasterPos3f = _gllib.glRasterPos3f
+glRasterPos3i = _gllib.glRasterPos3i
+glRasterPos3s = _gllib.glRasterPos3s
+glRasterPos4d = _gllib.glRasterPos4d
+glRasterPos4f = _gllib.glRasterPos4f
+glRasterPos4i = _gllib.glRasterPos4i
+glRasterPos4s = _gllib.glRasterPos4s
+glRasterPos2dv = _gllib.glRasterPos2dv
+glRasterPos2fv = _gllib.glRasterPos2fv
+glRasterPos2iv = _gllib.glRasterPos2iv
+glRasterPos2sv = _gllib.glRasterPos2sv
+glRasterPos3dv = _gllib.glRasterPos3dv
+glRasterPos3fv = _gllib.glRasterPos3fv
+glRasterPos3iv = _gllib.glRasterPos3iv
+glRasterPos3sv = _gllib.glRasterPos3sv
+glRasterPos4dv = _gllib.glRasterPos4dv
+glRasterPos4fv = _gllib.glRasterPos4fv
+glRasterPos4iv = _gllib.glRasterPos4iv
+glRasterPos4sv = _gllib.glRasterPos4sv
+glRectd = _gllib.glRectd
+glRectf = _gllib.glRectf
+glRecti = _gllib.glRecti
+glRects = _gllib.glRects
+glRectdv = _gllib.glRectdv
+glRectfv = _gllib.glRectfv
+glRectiv = _gllib.glRectiv
+glRectsv = _gllib.glRectsv
+glVertexPointer = _gllib.glVertexPointer
+glNormalPointer = _gllib.glNormalPointer
+glColorPointer = _gllib.glColorPointer
+glIndexPointer = _gllib.glIndexPointer
+glTexCoordPointer = _gllib.glTexCoordPointer
+glEdgeFlagPointer = _gllib.glEdgeFlagPointer
+glGetPointerv = _gllib.glGetPointerv
+glArrayElement = _gllib.glArrayElement
+glDrawArrays = _gllib.glDrawArrays
+glDrawElements = _gllib.glDrawElements
+glInterleavedArrays = _gllib.glInterleavedArrays
+glShadeModel = _gllib.glShadeModel
+glLightf = _gllib.glLightf
+glLighti = _gllib.glLighti
+glLightfv = _gllib.glLightfv
+glLightiv = _gllib.glLightiv
+glGetLightfv = _gllib.glGetLightfv
+glGetLightiv = _gllib.glGetLightiv
+glLightModelf = _gllib.glLightModelf
+glLightModeli = _gllib.glLightModeli
+glLightModelfv = _gllib.glLightModelfv
+glLightModeliv = _gllib.glLightModeliv
+glMaterialf = _gllib.glMaterialf
+glMateriali = _gllib.glMateriali
+glMaterialfv = _gllib.glMaterialfv
+glMaterialiv = _gllib.glMaterialiv
+glGetMaterialfv = _gllib.glGetMaterialfv
+glGetMaterialiv = _gllib.glGetMaterialiv
+glColorMaterial = _gllib.glColorMaterial
+glPixelZoom = _gllib.glPixelZoom
+glPixelStoref = _gllib.glPixelStoref
+glPixelStorei = _gllib.glPixelStorei
+glPixelTransferf = _gllib.glPixelTransferf
+glPixelTransferi = _gllib.glPixelTransferi
+glPixelMapfv = _gllib.glPixelMapfv
+glPixelMapuiv = _gllib.glPixelMapuiv
+glPixelMapusv = _gllib.glPixelMapusv
+glGetPixelMapfv = _gllib.glGetPixelMapfv
+glGetPixelMapuiv = _gllib.glGetPixelMapuiv
+glGetPixelMapusv = _gllib.glGetPixelMapusv
+glBitmap = _gllib.glBitmap
+glReadPixels = _gllib.glReadPixels
+glDrawPixels = _gllib.glDrawPixels
+glCopyPixels = _gllib.glCopyPixels
+glStencilFunc = _gllib.glStencilFunc
+glStencilMask = _gllib.glStencilMask
+glStencilOp = _gllib.glStencilOp
+glClearStencil = _gllib.glClearStencil
+glTexGend = _gllib.glTexGend
+glTexGenf = _gllib.glTexGenf
+glTexGeni = _gllib.glTexGeni
+glTexGendv = _gllib.glTexGendv
+glTexGenfv = _gllib.glTexGenfv
+glTexGeniv = _gllib.glTexGeniv
+glGetTexGendv = _gllib.glGetTexGendv
+glGetTexGenfv = _gllib.glGetTexGenfv
+glGetTexGeniv = _gllib.glGetTexGeniv
+glTexEnvf = _gllib.glTexEnvf
+glTexEnvi = _gllib.glTexEnvi
+glTexEnvfv = _gllib.glTexEnvfv
+glTexEnviv = _gllib.glTexEnviv
+glGetTexEnvfv = _gllib.glGetTexEnvfv
+glGetTexEnviv = _gllib.glGetTexEnviv
+glTexParameterf = _gllib.glTexParameterf
+glTexParameteri = _gllib.glTexParameteri
+glTexParameterfv = _gllib.glTexParameterfv
+glTexParameteriv = _gllib.glTexParameteriv
+glGetTexParameterfv = _gllib.glGetTexParameterfv
+glGetTexParameteriv = _gllib.glGetTexParameteriv
+glGetTexLevelParameterfv = _gllib.glGetTexLevelParameterfv
+glGetTexLevelParameteriv = _gllib.glGetTexLevelParameteriv
+glTexImage1D = _gllib.glTexImage1D
+glTexImage2D = _gllib.glTexImage2D
+glGetTexImage = _gllib.glGetTexImage
+glGenTextures = _gllib.glGenTextures
+glDeleteTextures = _gllib.glDeleteTextures
+glBindTexture = _gllib.glBindTexture
+glPrioritizeTextures = _gllib.glPrioritizeTextures
+glAreTexturesResident = _gllib.glAreTexturesResident
+glIsTexture = _gllib.glIsTexture
+glTexSubImage1D = _gllib.glTexSubImage1D
+glTexSubImage2D = _gllib.glTexSubImage2D
+glCopyTexImage1D = _gllib.glCopyTexImage1D
+glCopyTexImage2D = _gllib.glCopyTexImage2D
+glCopyTexSubImage1D = _gllib.glCopyTexSubImage1D
+glCopyTexSubImage2D = _gllib.glCopyTexSubImage2D
+glMap1d = _gllib.glMap1d
+glMap1f = _gllib.glMap1f
+glMap2d = _gllib.glMap2d
+glMap2f = _gllib.glMap2f
+glGetMapdv = _gllib.glGetMapdv
+glGetMapfv = _gllib.glGetMapfv
+glGetMapiv = _gllib.glGetMapiv
+glEvalCoord1d = _gllib.glEvalCoord1d
+glEvalCoord1f = _gllib.glEvalCoord1f
+glEvalCoord1dv = _gllib.glEvalCoord1dv
+glEvalCoord1fv = _gllib.glEvalCoord1fv
+glEvalCoord2d = _gllib.glEvalCoord2d
+glEvalCoord2f = _gllib.glEvalCoord2f
+glEvalCoord2dv = _gllib.glEvalCoord2dv
+glEvalCoord2fv = _gllib.glEvalCoord2fv
+glMapGrid1d = _gllib.glMapGrid1d
+glMapGrid1f = _gllib.glMapGrid1f
+glMapGrid2d = _gllib.glMapGrid2d
+glMapGrid2f = _gllib.glMapGrid2f
+glEvalPoint1 = _gllib.glEvalPoint1
+glEvalPoint2 = _gllib.glEvalPoint2
+glEvalMesh1 = _gllib.glEvalMesh1
+glEvalMesh2 = _gllib.glEvalMesh2
+glFogf = _gllib.glFogf
+glFogi = _gllib.glFogi
+glFogfv = _gllib.glFogfv
+glFogiv = _gllib.glFogiv
+glFeedbackBuffer = _gllib.glFeedbackBuffer
+glPassThrough = _gllib.glPassThrough
+glSelectBuffer = _gllib.glSelectBuffer
+glInitNames = _gllib.glInitNames
+glLoadName = _gllib.glLoadName
+glPushName = _gllib.glPushName
+glPopName = _gllib.glPopName
+GL_RESCALE_NORMAL = _gllib.GL_RESCALE_NORMAL
+GL_CLAMP_TO_EDGE = _gllib.GL_CLAMP_TO_EDGE
+GL_MAX_ELEMENTS_VERTICES = _gllib.GL_MAX_ELEMENTS_VERTICES
+GL_MAX_ELEMENTS_INDICES = _gllib.GL_MAX_ELEMENTS_INDICES
+GL_BGR = _gllib.GL_BGR
+GL_BGRA = _gllib.GL_BGRA
+GL_UNSIGNED_BYTE_3_3_2 = _gllib.GL_UNSIGNED_BYTE_3_3_2
+GL_UNSIGNED_BYTE_2_3_3_REV = _gllib.GL_UNSIGNED_BYTE_2_3_3_REV
+GL_UNSIGNED_SHORT_5_6_5 = _gllib.GL_UNSIGNED_SHORT_5_6_5
+GL_UNSIGNED_SHORT_5_6_5_REV = _gllib.GL_UNSIGNED_SHORT_5_6_5_REV
+GL_UNSIGNED_SHORT_4_4_4_4 = _gllib.GL_UNSIGNED_SHORT_4_4_4_4
+GL_UNSIGNED_SHORT_4_4_4_4_REV = _gllib.GL_UNSIGNED_SHORT_4_4_4_4_REV
+GL_UNSIGNED_SHORT_5_5_5_1 = _gllib.GL_UNSIGNED_SHORT_5_5_5_1
+GL_UNSIGNED_SHORT_1_5_5_5_REV = _gllib.GL_UNSIGNED_SHORT_1_5_5_5_REV
+GL_UNSIGNED_INT_8_8_8_8 = _gllib.GL_UNSIGNED_INT_8_8_8_8
+GL_UNSIGNED_INT_8_8_8_8_REV = _gllib.GL_UNSIGNED_INT_8_8_8_8_REV
+GL_UNSIGNED_INT_10_10_10_2 = _gllib.GL_UNSIGNED_INT_10_10_10_2
+GL_UNSIGNED_INT_2_10_10_10_REV = _gllib.GL_UNSIGNED_INT_2_10_10_10_REV
+GL_LIGHT_MODEL_COLOR_CONTROL = _gllib.GL_LIGHT_MODEL_COLOR_CONTROL
+GL_SINGLE_COLOR = _gllib.GL_SINGLE_COLOR
+GL_SEPARATE_SPECULAR_COLOR = _gllib.GL_SEPARATE_SPECULAR_COLOR
+GL_TEXTURE_MIN_LOD = _gllib.GL_TEXTURE_MIN_LOD
+GL_TEXTURE_MAX_LOD = _gllib.GL_TEXTURE_MAX_LOD
+GL_TEXTURE_BASE_LEVEL = _gllib.GL_TEXTURE_BASE_LEVEL
+GL_TEXTURE_MAX_LEVEL = _gllib.GL_TEXTURE_MAX_LEVEL
+GL_SMOOTH_POINT_SIZE_RANGE = _gllib.GL_SMOOTH_POINT_SIZE_RANGE
+GL_SMOOTH_POINT_SIZE_GRANULARITY = _gllib.GL_SMOOTH_POINT_SIZE_GRANULARITY
+GL_SMOOTH_LINE_WIDTH_RANGE = _gllib.GL_SMOOTH_LINE_WIDTH_RANGE
+GL_SMOOTH_LINE_WIDTH_GRANULARITY = _gllib.GL_SMOOTH_LINE_WIDTH_GRANULARITY
+GL_ALIASED_POINT_SIZE_RANGE = _gllib.GL_ALIASED_POINT_SIZE_RANGE
+GL_ALIASED_LINE_WIDTH_RANGE = _gllib.GL_ALIASED_LINE_WIDTH_RANGE
+GL_PACK_SKIP_IMAGES = _gllib.GL_PACK_SKIP_IMAGES
+GL_PACK_IMAGE_HEIGHT = _gllib.GL_PACK_IMAGE_HEIGHT
+GL_UNPACK_SKIP_IMAGES = _gllib.GL_UNPACK_SKIP_IMAGES
+GL_UNPACK_IMAGE_HEIGHT = _gllib.GL_UNPACK_IMAGE_HEIGHT
+GL_TEXTURE_3D = _gllib.GL_TEXTURE_3D
+GL_PROXY_TEXTURE_3D = _gllib.GL_PROXY_TEXTURE_3D
+GL_TEXTURE_DEPTH = _gllib.GL_TEXTURE_DEPTH
+GL_TEXTURE_WRAP_R = _gllib.GL_TEXTURE_WRAP_R
+GL_MAX_3D_TEXTURE_SIZE = _gllib.GL_MAX_3D_TEXTURE_SIZE
+GL_TEXTURE_BINDING_3D = _gllib.GL_TEXTURE_BINDING_3D
+glDrawRangeElements = _gllib.glDrawRangeElements
+glTexImage3D = _gllib.glTexImage3D
+glTexSubImage3D = _gllib.glTexSubImage3D
+glCopyTexSubImage3D = _gllib.glCopyTexSubImage3D
+GL_CONSTANT_COLOR = _gllib.GL_CONSTANT_COLOR
+GL_ONE_MINUS_CONSTANT_COLOR = _gllib.GL_ONE_MINUS_CONSTANT_COLOR
+GL_CONSTANT_ALPHA = _gllib.GL_CONSTANT_ALPHA
+GL_ONE_MINUS_CONSTANT_ALPHA = _gllib.GL_ONE_MINUS_CONSTANT_ALPHA
+GL_COLOR_TABLE = _gllib.GL_COLOR_TABLE
+GL_POST_CONVOLUTION_COLOR_TABLE = _gllib.GL_POST_CONVOLUTION_COLOR_TABLE
+GL_POST_COLOR_MATRIX_COLOR_TABLE = _gllib.GL_POST_COLOR_MATRIX_COLOR_TABLE
+GL_PROXY_COLOR_TABLE = _gllib.GL_PROXY_COLOR_TABLE
+GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = _gllib.GL_PROXY_POST_CONVOLUTION_COLOR_TABLE
+GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = _gllib.GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE
+GL_COLOR_TABLE_SCALE = _gllib.GL_COLOR_TABLE_SCALE
+GL_COLOR_TABLE_BIAS = _gllib.GL_COLOR_TABLE_BIAS
+GL_COLOR_TABLE_FORMAT = _gllib.GL_COLOR_TABLE_FORMAT
+GL_COLOR_TABLE_WIDTH = _gllib.GL_COLOR_TABLE_WIDTH
+GL_COLOR_TABLE_RED_SIZE = _gllib.GL_COLOR_TABLE_RED_SIZE
+GL_COLOR_TABLE_GREEN_SIZE = _gllib.GL_COLOR_TABLE_GREEN_SIZE
+GL_COLOR_TABLE_BLUE_SIZE = _gllib.GL_COLOR_TABLE_BLUE_SIZE
+GL_COLOR_TABLE_ALPHA_SIZE = _gllib.GL_COLOR_TABLE_ALPHA_SIZE
+GL_COLOR_TABLE_LUMINANCE_SIZE = _gllib.GL_COLOR_TABLE_LUMINANCE_SIZE
+GL_COLOR_TABLE_INTENSITY_SIZE = _gllib.GL_COLOR_TABLE_INTENSITY_SIZE
+GL_CONVOLUTION_1D = _gllib.GL_CONVOLUTION_1D
+GL_CONVOLUTION_2D = _gllib.GL_CONVOLUTION_2D
+GL_SEPARABLE_2D = _gllib.GL_SEPARABLE_2D
+GL_CONVOLUTION_BORDER_MODE = _gllib.GL_CONVOLUTION_BORDER_MODE
+GL_CONVOLUTION_FILTER_SCALE = _gllib.GL_CONVOLUTION_FILTER_SCALE
+GL_CONVOLUTION_FILTER_BIAS = _gllib.GL_CONVOLUTION_FILTER_BIAS
+GL_REDUCE = _gllib.GL_REDUCE
+GL_CONVOLUTION_FORMAT = _gllib.GL_CONVOLUTION_FORMAT
+GL_CONVOLUTION_WIDTH = _gllib.GL_CONVOLUTION_WIDTH
+GL_CONVOLUTION_HEIGHT = _gllib.GL_CONVOLUTION_HEIGHT
+GL_MAX_CONVOLUTION_WIDTH = _gllib.GL_MAX_CONVOLUTION_WIDTH
+GL_MAX_CONVOLUTION_HEIGHT = _gllib.GL_MAX_CONVOLUTION_HEIGHT
+GL_POST_CONVOLUTION_RED_SCALE = _gllib.GL_POST_CONVOLUTION_RED_SCALE
+GL_POST_CONVOLUTION_GREEN_SCALE = _gllib.GL_POST_CONVOLUTION_GREEN_SCALE
+GL_POST_CONVOLUTION_BLUE_SCALE = _gllib.GL_POST_CONVOLUTION_BLUE_SCALE
+GL_POST_CONVOLUTION_ALPHA_SCALE = _gllib.GL_POST_CONVOLUTION_ALPHA_SCALE
+GL_POST_CONVOLUTION_RED_BIAS = _gllib.GL_POST_CONVOLUTION_RED_BIAS
+GL_POST_CONVOLUTION_GREEN_BIAS = _gllib.GL_POST_CONVOLUTION_GREEN_BIAS
+GL_POST_CONVOLUTION_BLUE_BIAS = _gllib.GL_POST_CONVOLUTION_BLUE_BIAS
+GL_POST_CONVOLUTION_ALPHA_BIAS = _gllib.GL_POST_CONVOLUTION_ALPHA_BIAS
+GL_CONSTANT_BORDER = _gllib.GL_CONSTANT_BORDER
+GL_REPLICATE_BORDER = _gllib.GL_REPLICATE_BORDER
+GL_CONVOLUTION_BORDER_COLOR = _gllib.GL_CONVOLUTION_BORDER_COLOR
+GL_COLOR_MATRIX = _gllib.GL_COLOR_MATRIX
+GL_COLOR_MATRIX_STACK_DEPTH = _gllib.GL_COLOR_MATRIX_STACK_DEPTH
+GL_MAX_COLOR_MATRIX_STACK_DEPTH = _gllib.GL_MAX_COLOR_MATRIX_STACK_DEPTH
+GL_POST_COLOR_MATRIX_RED_SCALE = _gllib.GL_POST_COLOR_MATRIX_RED_SCALE
+GL_POST_COLOR_MATRIX_GREEN_SCALE = _gllib.GL_POST_COLOR_MATRIX_GREEN_SCALE
+GL_POST_COLOR_MATRIX_BLUE_SCALE = _gllib.GL_POST_COLOR_MATRIX_BLUE_SCALE
+GL_POST_COLOR_MATRIX_ALPHA_SCALE = _gllib.GL_POST_COLOR_MATRIX_ALPHA_SCALE
+GL_POST_COLOR_MATRIX_RED_BIAS = _gllib.GL_POST_COLOR_MATRIX_RED_BIAS
+GL_POST_COLOR_MATRIX_GREEN_BIAS = _gllib.GL_POST_COLOR_MATRIX_GREEN_BIAS
+GL_POST_COLOR_MATRIX_BLUE_BIAS = _gllib.GL_POST_COLOR_MATRIX_BLUE_BIAS
+GL_POST_COLOR_MATRIX_ALPHA_BIAS = _gllib.GL_POST_COLOR_MATRIX_ALPHA_BIAS
+GL_HISTOGRAM = _gllib.GL_HISTOGRAM
+GL_PROXY_HISTOGRAM = _gllib.GL_PROXY_HISTOGRAM
+GL_HISTOGRAM_WIDTH = _gllib.GL_HISTOGRAM_WIDTH
+GL_HISTOGRAM_FORMAT = _gllib.GL_HISTOGRAM_FORMAT
+GL_HISTOGRAM_RED_SIZE = _gllib.GL_HISTOGRAM_RED_SIZE
+GL_HISTOGRAM_GREEN_SIZE = _gllib.GL_HISTOGRAM_GREEN_SIZE
+GL_HISTOGRAM_BLUE_SIZE = _gllib.GL_HISTOGRAM_BLUE_SIZE
+GL_HISTOGRAM_ALPHA_SIZE = _gllib.GL_HISTOGRAM_ALPHA_SIZE
+GL_HISTOGRAM_LUMINANCE_SIZE = _gllib.GL_HISTOGRAM_LUMINANCE_SIZE
+GL_HISTOGRAM_SINK = _gllib.GL_HISTOGRAM_SINK
+GL_MINMAX = _gllib.GL_MINMAX
+GL_MINMAX_FORMAT = _gllib.GL_MINMAX_FORMAT
+GL_MINMAX_SINK = _gllib.GL_MINMAX_SINK
+GL_TABLE_TOO_LARGE = _gllib.GL_TABLE_TOO_LARGE
+GL_BLEND_EQUATION = _gllib.GL_BLEND_EQUATION
+GL_MIN = _gllib.GL_MIN
+GL_MAX = _gllib.GL_MAX
+GL_FUNC_ADD = _gllib.GL_FUNC_ADD
+GL_FUNC_SUBTRACT = _gllib.GL_FUNC_SUBTRACT
+GL_FUNC_REVERSE_SUBTRACT = _gllib.GL_FUNC_REVERSE_SUBTRACT
+GL_BLEND_COLOR = _gllib.GL_BLEND_COLOR
+glColorTable = _gllib.glColorTable
+glColorSubTable = _gllib.glColorSubTable
+glColorTableParameteriv = _gllib.glColorTableParameteriv
+glColorTableParameterfv = _gllib.glColorTableParameterfv
+glCopyColorSubTable = _gllib.glCopyColorSubTable
+glCopyColorTable = _gllib.glCopyColorTable
+glGetColorTable = _gllib.glGetColorTable
+glGetColorTableParameterfv = _gllib.glGetColorTableParameterfv
+glGetColorTableParameteriv = _gllib.glGetColorTableParameteriv
+glBlendEquation = _gllib.glBlendEquation
+glBlendColor = _gllib.glBlendColor
+glHistogram = _gllib.glHistogram
+glResetHistogram = _gllib.glResetHistogram
+glGetHistogram = _gllib.glGetHistogram
+glGetHistogramParameterfv = _gllib.glGetHistogramParameterfv
+glGetHistogramParameteriv = _gllib.glGetHistogramParameteriv
+glMinmax = _gllib.glMinmax
+glResetMinmax = _gllib.glResetMinmax
+glGetMinmax = _gllib.glGetMinmax
+glGetMinmaxParameterfv = _gllib.glGetMinmaxParameterfv
+glGetMinmaxParameteriv = _gllib.glGetMinmaxParameteriv
+glConvolutionFilter1D = _gllib.glConvolutionFilter1D
+glConvolutionFilter2D = _gllib.glConvolutionFilter2D
+glConvolutionParameterf = _gllib.glConvolutionParameterf
+glConvolutionParameterfv = _gllib.glConvolutionParameterfv
+glConvolutionParameteri = _gllib.glConvolutionParameteri
+glConvolutionParameteriv = _gllib.glConvolutionParameteriv
+glCopyConvolutionFilter1D = _gllib.glCopyConvolutionFilter1D
+glCopyConvolutionFilter2D = _gllib.glCopyConvolutionFilter2D
+glGetConvolutionFilter = _gllib.glGetConvolutionFilter
+glGetConvolutionParameterfv = _gllib.glGetConvolutionParameterfv
+glGetConvolutionParameteriv = _gllib.glGetConvolutionParameteriv
+glSeparableFilter2D = _gllib.glSeparableFilter2D
+glGetSeparableFilter = _gllib.glGetSeparableFilter
+GL_TEXTURE0 = _gllib.GL_TEXTURE0
+GL_TEXTURE1 = _gllib.GL_TEXTURE1
+GL_TEXTURE2 = _gllib.GL_TEXTURE2
+GL_TEXTURE3 = _gllib.GL_TEXTURE3
+GL_TEXTURE4 = _gllib.GL_TEXTURE4
+GL_TEXTURE5 = _gllib.GL_TEXTURE5
+GL_TEXTURE6 = _gllib.GL_TEXTURE6
+GL_TEXTURE7 = _gllib.GL_TEXTURE7
+GL_TEXTURE8 = _gllib.GL_TEXTURE8
+GL_TEXTURE9 = _gllib.GL_TEXTURE9
+GL_TEXTURE10 = _gllib.GL_TEXTURE10
+GL_TEXTURE11 = _gllib.GL_TEXTURE11
+GL_TEXTURE12 = _gllib.GL_TEXTURE12
+GL_TEXTURE13 = _gllib.GL_TEXTURE13
+GL_TEXTURE14 = _gllib.GL_TEXTURE14
+GL_TEXTURE15 = _gllib.GL_TEXTURE15
+GL_TEXTURE16 = _gllib.GL_TEXTURE16
+GL_TEXTURE17 = _gllib.GL_TEXTURE17
+GL_TEXTURE18 = _gllib.GL_TEXTURE18
+GL_TEXTURE19 = _gllib.GL_TEXTURE19
+GL_TEXTURE20 = _gllib.GL_TEXTURE20
+GL_TEXTURE21 = _gllib.GL_TEXTURE21
+GL_TEXTURE22 = _gllib.GL_TEXTURE22
+GL_TEXTURE23 = _gllib.GL_TEXTURE23
+GL_TEXTURE24 = _gllib.GL_TEXTURE24
+GL_TEXTURE25 = _gllib.GL_TEXTURE25
+GL_TEXTURE26 = _gllib.GL_TEXTURE26
+GL_TEXTURE27 = _gllib.GL_TEXTURE27
+GL_TEXTURE28 = _gllib.GL_TEXTURE28
+GL_TEXTURE29 = _gllib.GL_TEXTURE29
+GL_TEXTURE30 = _gllib.GL_TEXTURE30
+GL_TEXTURE31 = _gllib.GL_TEXTURE31
+GL_ACTIVE_TEXTURE = _gllib.GL_ACTIVE_TEXTURE
+GL_CLIENT_ACTIVE_TEXTURE = _gllib.GL_CLIENT_ACTIVE_TEXTURE
+GL_MAX_TEXTURE_UNITS = _gllib.GL_MAX_TEXTURE_UNITS
+GL_NORMAL_MAP = _gllib.GL_NORMAL_MAP
+GL_REFLECTION_MAP = _gllib.GL_REFLECTION_MAP
+GL_TEXTURE_CUBE_MAP = _gllib.GL_TEXTURE_CUBE_MAP
+GL_TEXTURE_BINDING_CUBE_MAP = _gllib.GL_TEXTURE_BINDING_CUBE_MAP
+GL_TEXTURE_CUBE_MAP_POSITIVE_X = _gllib.GL_TEXTURE_CUBE_MAP_POSITIVE_X
+GL_TEXTURE_CUBE_MAP_NEGATIVE_X = _gllib.GL_TEXTURE_CUBE_MAP_NEGATIVE_X
+GL_TEXTURE_CUBE_MAP_POSITIVE_Y = _gllib.GL_TEXTURE_CUBE_MAP_POSITIVE_Y
+GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = _gllib.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
+GL_TEXTURE_CUBE_MAP_POSITIVE_Z = _gllib.GL_TEXTURE_CUBE_MAP_POSITIVE_Z
+GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = _gllib.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
+GL_PROXY_TEXTURE_CUBE_MAP = _gllib.GL_PROXY_TEXTURE_CUBE_MAP
+GL_MAX_CUBE_MAP_TEXTURE_SIZE = _gllib.GL_MAX_CUBE_MAP_TEXTURE_SIZE
+GL_COMPRESSED_ALPHA = _gllib.GL_COMPRESSED_ALPHA
+GL_COMPRESSED_LUMINANCE = _gllib.GL_COMPRESSED_LUMINANCE
+GL_COMPRESSED_LUMINANCE_ALPHA = _gllib.GL_COMPRESSED_LUMINANCE_ALPHA
+GL_COMPRESSED_INTENSITY = _gllib.GL_COMPRESSED_INTENSITY
+GL_COMPRESSED_RGB = _gllib.GL_COMPRESSED_RGB
+GL_COMPRESSED_RGBA = _gllib.GL_COMPRESSED_RGBA
+GL_TEXTURE_COMPRESSION_HINT = _gllib.GL_TEXTURE_COMPRESSION_HINT
+GL_TEXTURE_COMPRESSED_IMAGE_SIZE = _gllib.GL_TEXTURE_COMPRESSED_IMAGE_SIZE
+GL_TEXTURE_COMPRESSED = _gllib.GL_TEXTURE_COMPRESSED
+GL_NUM_COMPRESSED_TEXTURE_FORMATS = _gllib.GL_NUM_COMPRESSED_TEXTURE_FORMATS
+GL_COMPRESSED_TEXTURE_FORMATS = _gllib.GL_COMPRESSED_TEXTURE_FORMATS
+GL_MULTISAMPLE = _gllib.GL_MULTISAMPLE
+GL_SAMPLE_ALPHA_TO_COVERAGE = _gllib.GL_SAMPLE_ALPHA_TO_COVERAGE
+GL_SAMPLE_ALPHA_TO_ONE = _gllib.GL_SAMPLE_ALPHA_TO_ONE
+GL_SAMPLE_COVERAGE = _gllib.GL_SAMPLE_COVERAGE
+GL_SAMPLE_BUFFERS = _gllib.GL_SAMPLE_BUFFERS
+GL_SAMPLES = _gllib.GL_SAMPLES
+GL_SAMPLE_COVERAGE_VALUE = _gllib.GL_SAMPLE_COVERAGE_VALUE
+GL_SAMPLE_COVERAGE_INVERT = _gllib.GL_SAMPLE_COVERAGE_INVERT
+GL_MULTISAMPLE_BIT = _gllib.GL_MULTISAMPLE_BIT
+GL_TRANSPOSE_MODELVIEW_MATRIX = _gllib.GL_TRANSPOSE_MODELVIEW_MATRIX
+GL_TRANSPOSE_PROJECTION_MATRIX = _gllib.GL_TRANSPOSE_PROJECTION_MATRIX
+GL_TRANSPOSE_TEXTURE_MATRIX = _gllib.GL_TRANSPOSE_TEXTURE_MATRIX
+GL_TRANSPOSE_COLOR_MATRIX = _gllib.GL_TRANSPOSE_COLOR_MATRIX
+GL_COMBINE = _gllib.GL_COMBINE
+GL_COMBINE_RGB = _gllib.GL_COMBINE_RGB
+GL_COMBINE_ALPHA = _gllib.GL_COMBINE_ALPHA
+GL_SOURCE0_RGB = _gllib.GL_SOURCE0_RGB
+GL_SOURCE1_RGB = _gllib.GL_SOURCE1_RGB
+GL_SOURCE2_RGB = _gllib.GL_SOURCE2_RGB
+GL_SOURCE0_ALPHA = _gllib.GL_SOURCE0_ALPHA
+GL_SOURCE1_ALPHA = _gllib.GL_SOURCE1_ALPHA
+GL_SOURCE2_ALPHA = _gllib.GL_SOURCE2_ALPHA
+GL_OPERAND0_RGB = _gllib.GL_OPERAND0_RGB
+GL_OPERAND1_RGB = _gllib.GL_OPERAND1_RGB
+GL_OPERAND2_RGB = _gllib.GL_OPERAND2_RGB
+GL_OPERAND0_ALPHA = _gllib.GL_OPERAND0_ALPHA
+GL_OPERAND1_ALPHA = _gllib.GL_OPERAND1_ALPHA
+GL_OPERAND2_ALPHA = _gllib.GL_OPERAND2_ALPHA
+GL_RGB_SCALE = _gllib.GL_RGB_SCALE
+GL_ADD_SIGNED = _gllib.GL_ADD_SIGNED
+GL_INTERPOLATE = _gllib.GL_INTERPOLATE
+GL_SUBTRACT = _gllib.GL_SUBTRACT
+GL_CONSTANT = _gllib.GL_CONSTANT
+GL_PRIMARY_COLOR = _gllib.GL_PRIMARY_COLOR
+GL_PREVIOUS = _gllib.GL_PREVIOUS
+GL_DOT3_RGB = _gllib.GL_DOT3_RGB
+GL_DOT3_RGBA = _gllib.GL_DOT3_RGBA
+GL_CLAMP_TO_BORDER = _gllib.GL_CLAMP_TO_BORDER
+glActiveTexture = _gllib.glActiveTexture
+glClientActiveTexture = _gllib.glClientActiveTexture
+glCompressedTexImage1D = _gllib.glCompressedTexImage1D
+glCompressedTexImage2D = _gllib.glCompressedTexImage2D
+glCompressedTexImage3D = _gllib.glCompressedTexImage3D
+glCompressedTexSubImage1D = _gllib.glCompressedTexSubImage1D
+glCompressedTexSubImage2D = _gllib.glCompressedTexSubImage2D
+glCompressedTexSubImage3D = _gllib.glCompressedTexSubImage3D
+glGetCompressedTexImage = _gllib.glGetCompressedTexImage
+glMultiTexCoord1d = _gllib.glMultiTexCoord1d
+glMultiTexCoord1dv = _gllib.glMultiTexCoord1dv
+glMultiTexCoord1f = _gllib.glMultiTexCoord1f
+glMultiTexCoord1fv = _gllib.glMultiTexCoord1fv
+glMultiTexCoord1i = _gllib.glMultiTexCoord1i
+glMultiTexCoord1iv = _gllib.glMultiTexCoord1iv
+glMultiTexCoord1s = _gllib.glMultiTexCoord1s
+glMultiTexCoord1sv = _gllib.glMultiTexCoord1sv
+glMultiTexCoord2d = _gllib.glMultiTexCoord2d
+glMultiTexCoord2dv = _gllib.glMultiTexCoord2dv
+glMultiTexCoord2f = _gllib.glMultiTexCoord2f
+glMultiTexCoord2fv = _gllib.glMultiTexCoord2fv
+glMultiTexCoord2i = _gllib.glMultiTexCoord2i
+glMultiTexCoord2iv = _gllib.glMultiTexCoord2iv
+glMultiTexCoord2s = _gllib.glMultiTexCoord2s
+glMultiTexCoord2sv = _gllib.glMultiTexCoord2sv
+glMultiTexCoord3d = _gllib.glMultiTexCoord3d
+glMultiTexCoord3dv = _gllib.glMultiTexCoord3dv
+glMultiTexCoord3f = _gllib.glMultiTexCoord3f
+glMultiTexCoord3fv = _gllib.glMultiTexCoord3fv
+glMultiTexCoord3i = _gllib.glMultiTexCoord3i
+glMultiTexCoord3iv = _gllib.glMultiTexCoord3iv
+glMultiTexCoord3s = _gllib.glMultiTexCoord3s
+glMultiTexCoord3sv = _gllib.glMultiTexCoord3sv
+glMultiTexCoord4d = _gllib.glMultiTexCoord4d
+glMultiTexCoord4dv = _gllib.glMultiTexCoord4dv
+glMultiTexCoord4f = _gllib.glMultiTexCoord4f
+glMultiTexCoord4fv = _gllib.glMultiTexCoord4fv
+glMultiTexCoord4i = _gllib.glMultiTexCoord4i
+glMultiTexCoord4iv = _gllib.glMultiTexCoord4iv
+glMultiTexCoord4s = _gllib.glMultiTexCoord4s
+glMultiTexCoord4sv = _gllib.glMultiTexCoord4sv
+glLoadTransposeMatrixd = _gllib.glLoadTransposeMatrixd
+glLoadTransposeMatrixf = _gllib.glLoadTransposeMatrixf
+glMultTransposeMatrixd = _gllib.glMultTransposeMatrixd
+glMultTransposeMatrixf = _gllib.glMultTransposeMatrixf
+glSampleCoverage = _gllib.glSampleCoverage
+GL_ARB_multitexture = _gllib.GL_ARB_multitexture
+GL_TEXTURE0_ARB = _gllib.GL_TEXTURE0_ARB
+GL_TEXTURE1_ARB = _gllib.GL_TEXTURE1_ARB
+GL_TEXTURE2_ARB = _gllib.GL_TEXTURE2_ARB
+GL_TEXTURE3_ARB = _gllib.GL_TEXTURE3_ARB
+GL_TEXTURE4_ARB = _gllib.GL_TEXTURE4_ARB
+GL_TEXTURE5_ARB = _gllib.GL_TEXTURE5_ARB
+GL_TEXTURE6_ARB = _gllib.GL_TEXTURE6_ARB
+GL_TEXTURE7_ARB = _gllib.GL_TEXTURE7_ARB
+GL_TEXTURE8_ARB = _gllib.GL_TEXTURE8_ARB
+GL_TEXTURE9_ARB = _gllib.GL_TEXTURE9_ARB
+GL_TEXTURE10_ARB = _gllib.GL_TEXTURE10_ARB
+GL_TEXTURE11_ARB = _gllib.GL_TEXTURE11_ARB
+GL_TEXTURE12_ARB = _gllib.GL_TEXTURE12_ARB
+GL_TEXTURE13_ARB = _gllib.GL_TEXTURE13_ARB
+GL_TEXTURE14_ARB = _gllib.GL_TEXTURE14_ARB
+GL_TEXTURE15_ARB = _gllib.GL_TEXTURE15_ARB
+GL_TEXTURE16_ARB = _gllib.GL_TEXTURE16_ARB
+GL_TEXTURE17_ARB = _gllib.GL_TEXTURE17_ARB
+GL_TEXTURE18_ARB = _gllib.GL_TEXTURE18_ARB
+GL_TEXTURE19_ARB = _gllib.GL_TEXTURE19_ARB
+GL_TEXTURE20_ARB = _gllib.GL_TEXTURE20_ARB
+GL_TEXTURE21_ARB = _gllib.GL_TEXTURE21_ARB
+GL_TEXTURE22_ARB = _gllib.GL_TEXTURE22_ARB
+GL_TEXTURE23_ARB = _gllib.GL_TEXTURE23_ARB
+GL_TEXTURE24_ARB = _gllib.GL_TEXTURE24_ARB
+GL_TEXTURE25_ARB = _gllib.GL_TEXTURE25_ARB
+GL_TEXTURE26_ARB = _gllib.GL_TEXTURE26_ARB
+GL_TEXTURE27_ARB = _gllib.GL_TEXTURE27_ARB
+GL_TEXTURE28_ARB = _gllib.GL_TEXTURE28_ARB
+GL_TEXTURE29_ARB = _gllib.GL_TEXTURE29_ARB
+GL_TEXTURE30_ARB = _gllib.GL_TEXTURE30_ARB
+GL_TEXTURE31_ARB = _gllib.GL_TEXTURE31_ARB
+GL_ACTIVE_TEXTURE_ARB = _gllib.GL_ACTIVE_TEXTURE_ARB
+GL_CLIENT_ACTIVE_TEXTURE_ARB = _gllib.GL_CLIENT_ACTIVE_TEXTURE_ARB
+GL_MAX_TEXTURE_UNITS_ARB = _gllib.GL_MAX_TEXTURE_UNITS_ARB
+glActiveTextureARB = _gllib.glActiveTextureARB
+glClientActiveTextureARB = _gllib.glClientActiveTextureARB
+glMultiTexCoord1dARB = _gllib.glMultiTexCoord1dARB
+glMultiTexCoord1dvARB = _gllib.glMultiTexCoord1dvARB
+glMultiTexCoord1fARB = _gllib.glMultiTexCoord1fARB
+glMultiTexCoord1fvARB = _gllib.glMultiTexCoord1fvARB
+glMultiTexCoord1iARB = _gllib.glMultiTexCoord1iARB
+glMultiTexCoord1ivARB = _gllib.glMultiTexCoord1ivARB
+glMultiTexCoord1sARB = _gllib.glMultiTexCoord1sARB
+glMultiTexCoord1svARB = _gllib.glMultiTexCoord1svARB
+glMultiTexCoord2dARB = _gllib.glMultiTexCoord2dARB
+glMultiTexCoord2dvARB = _gllib.glMultiTexCoord2dvARB
+glMultiTexCoord2fARB = _gllib.glMultiTexCoord2fARB
+glMultiTexCoord2fvARB = _gllib.glMultiTexCoord2fvARB
+glMultiTexCoord2iARB = _gllib.glMultiTexCoord2iARB
+glMultiTexCoord2ivARB = _gllib.glMultiTexCoord2ivARB
+glMultiTexCoord2sARB = _gllib.glMultiTexCoord2sARB
+glMultiTexCoord2svARB = _gllib.glMultiTexCoord2svARB
+glMultiTexCoord3dARB = _gllib.glMultiTexCoord3dARB
+glMultiTexCoord3dvARB = _gllib.glMultiTexCoord3dvARB
+glMultiTexCoord3fARB = _gllib.glMultiTexCoord3fARB
+glMultiTexCoord3fvARB = _gllib.glMultiTexCoord3fvARB
+glMultiTexCoord3iARB = _gllib.glMultiTexCoord3iARB
+glMultiTexCoord3ivARB = _gllib.glMultiTexCoord3ivARB
+glMultiTexCoord3sARB = _gllib.glMultiTexCoord3sARB
+glMultiTexCoord3svARB = _gllib.glMultiTexCoord3svARB
+glMultiTexCoord4dARB = _gllib.glMultiTexCoord4dARB
+glMultiTexCoord4dvARB = _gllib.glMultiTexCoord4dvARB
+glMultiTexCoord4fARB = _gllib.glMultiTexCoord4fARB
+glMultiTexCoord4fvARB = _gllib.glMultiTexCoord4fvARB
+glMultiTexCoord4iARB = _gllib.glMultiTexCoord4iARB
+glMultiTexCoord4ivARB = _gllib.glMultiTexCoord4ivARB
+glMultiTexCoord4sARB = _gllib.glMultiTexCoord4sARB
+glMultiTexCoord4svARB = _gllib.glMultiTexCoord4svARB
+GL_MESA_packed_depth_stencil = _gllib.GL_MESA_packed_depth_stencil
+GL_DEPTH_STENCIL_MESA = _gllib.GL_DEPTH_STENCIL_MESA
+GL_UNSIGNED_INT_24_8_MESA = _gllib.GL_UNSIGNED_INT_24_8_MESA
+GL_UNSIGNED_INT_8_24_REV_MESA = _gllib.GL_UNSIGNED_INT_8_24_REV_MESA
+GL_UNSIGNED_SHORT_15_1_MESA = _gllib.GL_UNSIGNED_SHORT_15_1_MESA
+GL_UNSIGNED_SHORT_1_15_REV_MESA = _gllib.GL_UNSIGNED_SHORT_1_15_REV_MESA
+GL_MESA_program_debug = _gllib.GL_MESA_program_debug
+GL_FRAGMENT_PROGRAM_POSITION_MESA = _gllib.GL_FRAGMENT_PROGRAM_POSITION_MESA
+GL_FRAGMENT_PROGRAM_CALLBACK_MESA = _gllib.GL_FRAGMENT_PROGRAM_CALLBACK_MESA
+GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA = _gllib.GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA
+GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA = _gllib.GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA
+GL_VERTEX_PROGRAM_POSITION_MESA = _gllib.GL_VERTEX_PROGRAM_POSITION_MESA
+GL_VERTEX_PROGRAM_CALLBACK_MESA = _gllib.GL_VERTEX_PROGRAM_CALLBACK_MESA
+GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA = _gllib.GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA
+GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA = _gllib.GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA
+GL_ATI_blend_equation_separate = _gllib.GL_ATI_blend_equation_separate
+GL_ALPHA_BLEND_EQUATION_ATI = _gllib.GL_ALPHA_BLEND_EQUATION_ATI
+glBlendEquationSeparateATI = _gllib.glBlendEquationSeparateATI
+
+cvar = _gllib.cvar
+glBegin = _gllib.glBegin
+glEnd = _gllib.glEnd
+glGetError = _gllib.glGetError
+glGetString = _gllib.glGetString
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib_wrap.c
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib_wrap.c	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/gllib_wrap.c	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,41669 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.33
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic CAPI SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "3"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The swig conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old swig versions, you usually write code as:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit as:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   that seems to be the same, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   requires also to SWIG_ConvertPtr to return new result values, as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   swig errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+
+
+ */
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store inforomation on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/* think of this as a c++ template<> or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty)         \
+  if (ty) {                                             \
+    swig_cast_info *iter = ty->cast;                    \
+    while (iter) {                                      \
+      if (comparison) {                                 \
+        if (iter == ty->cast) return iter;              \
+        /* Move iter to the top of the linked list */   \
+        iter->prev->next = iter->next;                  \
+        if (iter->next)                                 \
+          iter->next->prev = iter->prev;                \
+        iter->next = ty->cast;                          \
+        iter->prev = 0;                                 \
+        if (ty->cast) ty->cast->prev = iter;            \
+        ty->cast = iter;                                \
+        return iter;                                    \
+      }                                                 \
+      iter = iter->next;                                \
+    }                                                   \
+  }                                                     \
+  return 0
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
+}
+
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+  SWIG_TypeCheck_Template(iter->type == from, into);
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_Format(PyExc_RuntimeError, mesg);
+  }
+}
+
+
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, (char *) msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+  PyDict_SetItemString(d, (char*) name, obj);
+  Py_DECREF(obj);                            
+}
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* PySwigClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+} PySwigClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME PySwigClientData * 
+PySwigClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+PySwigClientData_Del(PySwigClientData* data)
+{
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== PySwigObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+} PySwigObject;
+
+SWIGRUNTIME PyObject *
+PySwigObject_long(PySwigObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_format(const char* fmt, PySwigObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
+      PyObject *ofmt = PyString_FromString(fmt);
+      if (ofmt) {
+	res = PyString_Format(ofmt,args);
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_oct(PySwigObject *v)
+{
+  return PySwigObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_hex(PySwigObject *v)
+{
+  return PySwigObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+PySwigObject_repr(PySwigObject *v)
+#else
+PySwigObject_repr(PySwigObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *hex = PySwigObject_hex(v);    
+  PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
+  Py_DECREF(hex);
+  if (v->next) {
+#ifdef METH_NOARGS
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
+#else
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
+#endif
+    PyString_ConcatAndDel(&repr,nrep);
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+#ifdef METH_NOARGS
+  PyObject *repr = PySwigObject_repr(v);
+#else
+  PyObject *repr = PySwigObject_repr(v, NULL);
+#endif
+  if (repr) {
+    fputs(PyString_AsString(repr), fp);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_str(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    PyString_FromString(result) : 0;
+}
+
+SWIGRUNTIME int
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigObject_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigObject_type())
+    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+PySwigObject_dealloc(PyObject *v)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own) {
+    swig_type_info *ty = sobj->ty;
+    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporal object to carry the destroy operation */
+	PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } else {
+      const char *name = SWIG_TypePrettyName(ty);
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
+#endif
+    }
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+PySwigObject_append(PyObject* v, PyObject* next)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!PySwigObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+PySwigObject_next(PyObject* v)
+#else
+PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_disown(PyObject *v)
+#else
+PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_acquire(PyObject *v)
+#else
+PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+PySwigObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      PySwigObject *sobj = (PySwigObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v);
+	} else {
+	  PySwigObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v,args);
+	} else {
+	  PySwigObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+PySwigObject_getattr(PySwigObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+_PySwigObject_type(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods PySwigObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    (binaryfunc)0, /*nb_divide*/
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+    (coercion)0,   /*nb_coerce*/
+    (unaryfunc)PySwigObject_long, /*nb_int*/
+    (unaryfunc)PySwigObject_long, /*nb_long*/
+    (unaryfunc)0,                 /*nb_float*/
+    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
+    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject pyswigobject_type;  
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */
+	(char *)"PySwigObject",		    /* tp_name */
+	sizeof(PySwigObject),		    /* tp_basicsize */
+	0,			            /* tp_itemsize */
+	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
+	(printfunc)PySwigObject_print,	    /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
+#else
+	(getattrfunc)0,			    /* tp_getattr */ 
+#endif
+	(setattrfunc)0,			    /* tp_setattr */ 
+	(cmpfunc)PySwigObject_compare,	    /* tp_compare */ 
+	(reprfunc)PySwigObject_repr,	    /* tp_repr */    
+	&PySwigObject_as_number,	    /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)PySwigObject_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigobject_doc, 	            /* tp_doc */        
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	swigobject_methods,		    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0,	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigobject_type = tmp;
+    pyswigobject_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigobject_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} PySwigPacked;
+
+SWIGRUNTIME int
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+PySwigPacked_repr(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_str(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return PyString_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return PyString_FromString(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigPacked_Check(PyObject *op) {
+  return ((op)->ob_type == _PySwigPacked_type()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+}
+
+SWIGRUNTIME void
+PySwigPacked_dealloc(PyObject *v)
+{
+  if (PySwigPacked_Check(v)) {
+    PySwigPacked *sobj = (PySwigPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+_PySwigPacked_type(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject pyswigpacked_type;
+  static int type_init = 0;  
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */	
+	(char *)"PySwigPacked",		    /* tp_name */	
+	sizeof(PySwigPacked),		    /* tp_basicsize */	
+	0,				    /* tp_itemsize */	
+	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)PySwigPacked_print,	    /* tp_print */   	
+	(getattrfunc)0,			    /* tp_getattr */ 	
+	(setattrfunc)0,			    /* tp_setattr */ 	
+	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
+	(reprfunc)PySwigPacked_repr,	    /* tp_repr */    	
+	0,	                            /* tp_as_number */	
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */	
+	(hashfunc)0,			    /* tp_hash */	
+	(ternaryfunc)0,			    /* tp_call */	
+	(reprfunc)PySwigPacked_str,	    /* tp_str */	
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigpacked_doc, 	            /* tp_doc */
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	0,		                    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0, 	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigpacked_type = tmp;
+    pyswigpacked_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigpacked_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (PySwigPacked_Check(obj)) {
+    PySwigPacked *sobj = (PySwigPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+  return PyString_FromString("this");
+}
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+SWIGRUNTIME PySwigObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  if (PySwigObject_Check(pyobj)) {
+    return (PySwigObject *) pyobj;
+  } else {
+    PyObject *obj = 0;
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+    if (PyInstance_Check(pyobj)) {
+      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+    } else {
+      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+      } else {
+#ifdef PyWeakref_CheckProxy
+	if (PyWeakref_CheckProxy(pyobj)) {
+	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+	}
+#endif
+	obj = PyObject_GetAttr(pyobj,SWIG_This());
+	if (obj) {
+	  Py_DECREF(obj);
+	} else {
+	  if (PyErr_Occurred()) PyErr_Clear();
+	  return 0;
+	}
+      }
+    }
+#else
+    obj = PyObject_GetAttr(pyobj,SWIG_This());
+    if (obj) {
+      Py_DECREF(obj);
+    } else {
+      if (PyErr_Occurred()) PyErr_Clear();
+      return 0;
+    }
+#endif
+    if (obj && !PySwigObject_Check(obj)) {
+      /* a PyObject is called 'this', try to get the 'real this'
+	 PySwigObject from it */ 
+      return SWIG_Python_GetSwigThis(obj);
+    }
+    return (PySwigObject *)obj;
+  }
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own) {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  if (!obj) return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr) *ptr = 0;
+    return SWIG_OK;
+  } else {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    while (sobj) {
+      void *vptr = sobj->ptr;
+      if (ty) {
+	swig_type_info *to = sobj->ty;
+	if (to == ty) {
+	  /* no type cast needed */
+	  if (ptr) *ptr = vptr;
+	  break;
+	} else {
+	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+	  if (!tc) {
+	    sobj = (PySwigObject *)sobj->next;
+	  } else {
+	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+	    break;
+	  }
+	}
+      } else {
+	if (ptr) *ptr = vptr;
+	break;
+      }
+    }
+    if (sobj) {
+      if (own) *own = sobj->own;
+      if (flags & SWIG_POINTER_DISOWN) {
+	sobj->own = 0;
+      }
+      return SWIG_OK;
+    } else {
+      int res = SWIG_ERROR;
+      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+	PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+	if (data && !data->implicitconv) {
+	  PyObject *klass = data->klass;
+	  if (klass) {
+	    PyObject *impconv;
+	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+	    impconv = SWIG_Python_CallFunctor(klass, obj);
+	    data->implicitconv = 0;
+	    if (PyErr_Occurred()) {
+	      PyErr_Clear();
+	      impconv = 0;
+	    }
+	    if (impconv) {
+	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      if (iobj) {
+		void *vptr;
+		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+		if (SWIG_IsOK(res)) {
+		  if (ptr) {
+		    *ptr = vptr;
+		    /* transfer the ownership to 'ptr' */
+		    iobj->own = 0;
+		    res = SWIG_AddCast(res);
+		    res = SWIG_AddNewMask(res);
+		  } else {
+		    res = SWIG_AddCast(res);		    
+		  }
+		}
+	      }
+	      Py_DECREF(impconv);
+	    }
+	  }
+	}
+      }
+      return res;
+    }
+  }
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc) {
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+      if (!desc) return SWIG_ERROR;
+    }
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (!tc) return SWIG_ERROR;
+      *ptr = SWIG_TypeCast(tc,vptr);
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, whitout calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      PySwigObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
+  if (!ptr) {
+    return SWIG_Py_Void();
+  } else {
+    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+    PyObject *robj = PySwigObject_New(ptr, type, own);
+    PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
+    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+      if (inst) {
+	Py_DECREF(robj);
+	robj = inst;
+      }
+    }
+    return robj;
+  }
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+SWIG_Python_DestroyModule(void *vptr)
+{
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
+      if (data) PySwigClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
+
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				   swig_empty_runtime_method_table);
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = PyString_FromString(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+      }
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigObject_GetDesc(PyObject *self)
+{
+  PySwigObject *v = (PySwigObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && PySwigObject_Check(obj)) {
+      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? PyString_AsString(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+    if (flags & SWIG_POINTER_EXCEPTION) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+  }
+  return result;
+}
+
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_char swig_types[0]
+#define SWIGTYPE_p_double swig_types[1]
+#define SWIGTYPE_p_float swig_types[2]
+#define SWIGTYPE_p_int swig_types[3]
+#define SWIGTYPE_p_p_void swig_types[4]
+#define SWIGTYPE_p_short swig_types[5]
+#define SWIGTYPE_p_signed_char swig_types[6]
+#define SWIGTYPE_p_unsigned_char swig_types[7]
+#define SWIGTYPE_p_unsigned_int swig_types[8]
+#define SWIGTYPE_p_unsigned_short swig_types[9]
+#define SWIGTYPE_p_void swig_types[10]
+static swig_type_info *swig_types[12];
+static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _gllib.so
+  ------------------------------------------------*/
+#define SWIG_init    init_gllib
+
+#define SWIG_name    "_gllib"
+
+#define SWIGVERSION 0x010333 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _MSC_VER
+# include <windows.h>
+#endif
+
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
+#include <GL/gl.h>
+#endif
+
+#include <pythonplus.h>
+
+
+#include "opengltk.h"
+
+static struct opengltk_export* s_opengltk = NULL;
+PyObject_t PypImport_ModuleAttr( char const* modulename, char const* name)
+{
+  PyObject_t module, result;
+  module = PyImport_ImportModule( (char*)modulename);
+  if (NOT module) return NULL;
+  result = PyObject_GetAttrString( module, (char*)name);
+  Py_DECREF( module);
+  return result;
+}
+
+void* PypImport_ModuleCobjAttr( char const* module, char const* name)
+{
+  PyObject_t attr;
+  void* result;
+
+  attr = PypImport_ModuleAttr( module, name);
+  if (NOT attr) return NULL;
+  result = PyCObject_AsVoidPtr( attr);
+  Py_DECREF( attr);
+  return result;
+}
+
+
+
+
+static int s_beginlevel = 0;
+
+static PyObject_t gl_begin( PyObject_t self, PyObject_t args)
+{
+  int mode;
+
+  if(NOT PyArg_ParseTuple(args, "i", &mode)) return NULL;
+
+  if (s_beginlevel) return PyErr_Format( PyExc_RuntimeError,
+					 "glBegin() already opened");
+  s_beginlevel = 1;
+  glBegin( mode);
+
+  s_opengltk->threadunlocked = 0;
+  s_opengltk->checkerror = 0;
+
+  return Py_INCREF( Py_None), Py_None;
+}
+
+static PyObject_t gl_end( PyObject_t self, PyObject_t args)
+{
+  GLenum errcode;
+
+  if(NOT PyArg_ParseTuple(args, "")) return NULL;
+
+  if (NOT s_beginlevel) return PyErr_Format( PyExc_RuntimeError,
+					     "glBegin() not opened");
+  glEnd();
+
+  s_beginlevel = 0;
+  s_opengltk->threadunlocked = 1;
+  s_opengltk->checkerror = 1;
+
+  errcode = glGetError();
+  if (errcode)
+    {
+      PyObject_t errret;
+      errret = s_opengltk->processerror( errcode);
+      if (errret) Py_DECREF( errret);
+      else return NULL;
+    }
+
+  return Py_INCREF( Py_None), Py_None;
+}
+
+static PyObject_t stableGetError( PyObject_t self, PyObject_t args)
+{
+  if(NOT PyArg_ParseTuple(args, "")) return NULL;
+
+  if (NOT s_opengltk->checkerror)
+    return PyErr_Format( PyExc_RuntimeError, "NOT s_opengltk->checkerror");
+
+  return PyInt_FromLong( glGetError());
+}
+
+
+int checkArraySize = 1;
+int checkArgumentsInCWrapper=1;
+
+#include "numpy/arrayobject.h"
+
+int NumericTypecode(char *type)
+{
+  /* maps GL types to Numeric types */
+  if (strcmp(type,"GLbyte")==0) return NPY_BYTE;
+  else if (strcmp(type,"GLdouble")==0) return NPY_DOUBLE;
+  else if (strcmp(type,"GLfloat")==0) return NPY_FLOAT;
+  else if (strcmp(type,"GLint")==0) return NPY_INT;
+  else if (strcmp(type,"GLshort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLubyte")==0) return NPY_UBYTE;
+  else if (strcmp(type,"GLuint")==0) return NPY_INT;
+  else if (strcmp(type,"GLushort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLboolean")==0) return NPY_UBYTE;
+}
+
+/*********************************************
+   1. Check if the incomming object is a buffer object.
+   2. If buffer - check if it is a numeric array.
+   3. If numeric array -  check if it is contiguous - 
+        return 1.
+   4. If buffer but not a numeric array - return 1.
+   5. In all other cases return 0.
+*******************************************/
+int isContiguosBuffer(PyObject *incommingObject)
+{
+  int contig;
+  /** Check if object is a buffer object **/
+  /** if (PyBuffer_Check(incommingObject)) **/
+  PyBufferProcs *pb = incommingObject->ob_type->tp_as_buffer;
+  if (pb == NULL || pb->bf_getsegcount == NULL )
+    contig = 0;
+  else
+  {
+    /** printf ("object is a buffer\n"); **/
+    if (PyArray_Check(incommingObject))
+    {
+      /** printf ("object is a Numeric array\n"); **/
+      if (PyArray_ISCONTIGUOUS((PyArrayObject*)incommingObject))
+	contig = 1;
+      else contig = 0;	
+    }
+    else
+      contig = 1; 
+  }
+  return contig;
+}
+/**********************************************************
+This function takes a Python object and creates a Numeric Array 
+after checking that the incomming object is of an acceptable
+type(size).
+***********************************************************/
+
+void bufferWithCheck(PyObject *incommingObject, 
+		     PyArrayObject **Narray,
+                     char *type, int nbElem)
+{
+  char buf[255];
+  int typecode, size, i;
+  /**PyArrayObject *Narray; */
+  /* make contiguous if needed */
+  typecode = NumericTypecode(type);
+  *Narray = (PyArrayObject *)PyArray_ContiguousFromObject(incommingObject,
+							typecode, 0, 10 );
+  if (*Narray == NULL) 
+  {
+    sprintf(buf,"Failed to make a contiguous array of type %d\n",
+            typecode);
+    PyErr_SetString(PyExc_ValueError, buf);
+         *Narray =  NULL;
+  }
+   if (checkArraySize && nbElem)
+   {
+     /* check size */
+     size = 1;
+     for (i=0; i<((*Narray)->nd); i++)
+     size = size * ((*Narray)->dimensions[i]);
+     if (size!=nbElem) 
+     {
+       sprintf(buf, "%d values received when %d expected\n", size, nbElem);
+       PyErr_SetString(PyExc_ValueError, buf);
+       *Narray = NULL;
+     }
+   }
+}
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+  #define SWIG_From_long   PyInt_FromLong 
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_float (PyObject * obj, float *val)
+{
+  double v;
+  int res = SWIG_AsVal_double (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < -FLT_MAX || v > FLT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (float)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UCHAR_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned char)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > USHRT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned short)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject* 
+SWIG_From_unsigned_SS_long  (unsigned long value)
+{
+  return (value > LONG_MAX) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); 
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_char  (unsigned char value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_int  (unsigned int value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_short (PyObject * obj, short *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < SHRT_MIN || v > SHRT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (short)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_signed_SS_char (PyObject * obj, signed char *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < SCHAR_MIN || v > SCHAR_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (signed char)(v);
+    }
+  }  
+  return res;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN int Swig_var_checkArgumentsInCWrapper_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""checkArgumentsInCWrapper""' of type '""int""'");
+    }
+    checkArgumentsInCWrapper = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_checkArgumentsInCWrapper_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(checkArgumentsInCWrapper));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *result = 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glGetString",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetString" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (char *)glGetString(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClearIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClearIndex",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClearIndex" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClearIndex(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClearColor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLclampf arg1 ;
+  GLclampf arg2 ;
+  GLclampf arg3 ;
+  GLclampf arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glClearColor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClearColor" "', argument " "1"" of type '" "GLclampf""'");
+  } 
+  arg1 = (GLclampf)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glClearColor" "', argument " "2"" of type '" "GLclampf""'");
+  } 
+  arg2 = (GLclampf)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glClearColor" "', argument " "3"" of type '" "GLclampf""'");
+  } 
+  arg3 = (GLclampf)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glClearColor" "', argument " "4"" of type '" "GLclampf""'");
+  } 
+  arg4 = (GLclampf)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClearColor(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbitfield arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClear",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClear" "', argument " "1"" of type '" "GLbitfield""'");
+  } 
+  arg1 = (GLbitfield)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClear(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexMask",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexMask" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexMask(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLboolean arg1 ;
+  GLboolean arg2 ;
+  GLboolean arg3 ;
+  GLboolean arg4 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  unsigned char val3 ;
+  int ecode3 = 0 ;
+  unsigned char val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColorMask",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorMask" "', argument " "1"" of type '" "GLboolean""'");
+  } 
+  arg1 = (GLboolean)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorMask" "', argument " "2"" of type '" "GLboolean""'");
+  } 
+  arg2 = (GLboolean)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColorMask" "', argument " "3"" of type '" "GLboolean""'");
+  } 
+  arg3 = (GLboolean)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColorMask" "', argument " "4"" of type '" "GLboolean""'");
+  } 
+  arg4 = (GLboolean)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorMask(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glAlphaFunc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLclampf arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glAlphaFunc",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glAlphaFunc" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glAlphaFunc" "', argument " "2"" of type '" "GLclampf""'");
+  } 
+  arg2 = (GLclampf)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glAlphaFunc(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBlendFunc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glBlendFunc",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBlendFunc" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glBlendFunc" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBlendFunc(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLogicOp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLogicOp",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLogicOp" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLogicOp(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCullFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glCullFace",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCullFace" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCullFace(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFrontFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glFrontFace",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFrontFace" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFrontFace(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPointSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPointSize",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPointSize" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPointSize(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLineWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLineWidth",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLineWidth" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLineWidth(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLineStipple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLushort arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glLineStipple",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLineStipple" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLineStipple" "', argument " "2"" of type '" "GLushort""'");
+  } 
+  arg2 = (GLushort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLineStipple(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPolygonMode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPolygonMode",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPolygonMode" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPolygonMode" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPolygonMode(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPolygonOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPolygonOffset",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPolygonOffset" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPolygonOffset" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPolygonOffset(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPolygonStipple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPolygonStipple",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 128);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPolygonStipple((unsigned char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetPolygonStipple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 = (GLubyte *) 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glGetPolygonStipple",&obj0)) SWIG_fail;
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj0, (void**)&arg1, &buffer_len))
+    return NULL;
+    if (! arg1) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetPolygonStipple(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEdgeFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLboolean arg1 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEdgeFlag",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEdgeFlag" "', argument " "1"" of type '" "GLboolean""'");
+  } 
+  arg1 = (GLboolean)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEdgeFlag(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEdgeFlagv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLboolean *arg1 = (GLboolean *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEdgeFlagv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLboolean", 0);
+        if (! array1) return NULL;
+        arg1 = (GLboolean *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEdgeFlagv((unsigned char const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glScissor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glScissor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glScissor" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glScissor" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glScissor" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glScissor" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glScissor(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClipPlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glClipPlane",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClipPlane" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 4);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClipPlane(arg1,(double const (*))arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetClipPlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetClipPlane",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetClipPlane" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetClipPlane(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glDrawBuffer",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawBuffer" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDrawBuffer(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glReadBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glReadBuffer",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glReadBuffer" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glReadBuffer(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEnable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEnable",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEnable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEnable(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDisable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glDisable",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDisable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDisable(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIsEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLboolean result;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIsEnabled",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIsEnabled" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLboolean)glIsEnabled(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEnableClientState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEnableClientState",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEnableClientState" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEnableClientState(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDisableClientState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glDisableClientState",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDisableClientState" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDisableClientState(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetBooleanv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLboolean *arg2 = (GLboolean *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetBooleanv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetBooleanv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetBooleanv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetDoublev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetDoublev",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetDoublev" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetDoublev(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetFloatv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetFloatv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetFloatv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetFloatv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetIntegerv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetIntegerv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetIntegerv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetIntegerv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPushAttrib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbitfield arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPushAttrib",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPushAttrib" "', argument " "1"" of type '" "GLbitfield""'");
+  } 
+  arg1 = (GLbitfield)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPushAttrib(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPopAttrib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glPopAttrib")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPopAttrib();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPushClientAttrib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbitfield arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPushClientAttrib",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPushClientAttrib" "', argument " "1"" of type '" "GLbitfield""'");
+  } 
+  arg1 = (GLbitfield)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPushClientAttrib(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPopClientAttrib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glPopClientAttrib")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPopClientAttrib();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRenderMode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint result;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRenderMode",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRenderMode" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)glRenderMode(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLubyte *result = 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glGetString",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetString" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLubyte *)glGetString(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetString(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[2];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = (int)PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 1); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 1) {
+    int _v;
+    {
+      int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      return _wrap_glGetString__SWIG_1(self, args);
+    }
+  }
+  if (argc == 1) {
+    int _v;
+    {
+      int res = SWIG_AsVal_int(argv[0], NULL);
+      _v = SWIG_CheckState(res);
+    }
+    if (_v) {
+      return _wrap_glGetString__SWIG_0(self, args);
+    }
+  }
+  
+fail:
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'glGetString'.\n  Possible C/C++ prototypes are:\n""    glGetString(int)\n""    glGetString(GLenum)\n");
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFinish(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glFinish")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFinish();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFlush(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glFlush")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFlush();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glHint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glHint",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glHint" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glHint" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glHint(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClearDepth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLclampd arg1 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClearDepth",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClearDepth" "', argument " "1"" of type '" "GLclampd""'");
+  } 
+  arg1 = (GLclampd)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClearDepth(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDepthFunc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glDepthFunc",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDepthFunc" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDepthFunc(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDepthMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLboolean arg1 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glDepthMask",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDepthMask" "', argument " "1"" of type '" "GLboolean""'");
+  } 
+  arg1 = (GLboolean)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDepthMask(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDepthRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLclampd arg1 ;
+  GLclampd arg2 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glDepthRange",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDepthRange" "', argument " "1"" of type '" "GLclampd""'");
+  } 
+  arg1 = (GLclampd)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDepthRange" "', argument " "2"" of type '" "GLclampd""'");
+  } 
+  arg2 = (GLclampd)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDepthRange(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClearAccum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glClearAccum",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClearAccum" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glClearAccum" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glClearAccum" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glClearAccum" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClearAccum(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glAccum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glAccum",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glAccum" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glAccum" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glAccum(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMatrixMode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glMatrixMode",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMatrixMode" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMatrixMode(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glOrtho(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble arg5 ;
+  GLdouble arg6 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glOrtho",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glOrtho" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glOrtho" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glOrtho" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glOrtho" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glOrtho" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glOrtho" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glOrtho(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFrustum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble arg5 ;
+  GLdouble arg6 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glFrustum",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFrustum" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glFrustum" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glFrustum" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glFrustum" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glFrustum" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glFrustum" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFrustum(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glViewport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glViewport",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glViewport" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glViewport" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glViewport" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glViewport" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glViewport(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPushMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glPushMatrix")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPushMatrix();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPopMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glPopMatrix")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPopMatrix();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadIdentity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glLoadIdentity")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadIdentity();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadMatrixd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLoadMatrixd",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 16);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadMatrixd((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadMatrixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLoadMatrixf",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 16);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadMatrixf((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultMatrixd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glMultMatrixd",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 16);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultMatrixd((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultMatrixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glMultMatrixf",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 16);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultMatrixf((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRotated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRotated",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRotated" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRotated" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRotated" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRotated" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRotated(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRotatef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRotatef",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRotatef" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRotatef" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRotatef" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRotatef" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRotatef(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glScaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glScaled",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glScaled" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glScaled" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glScaled" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glScaled(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glScalef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glScalef",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glScalef" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glScalef" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glScalef" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glScalef(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTranslated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTranslated",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTranslated" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTranslated" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTranslated" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTranslated(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTranslatef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTranslatef",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTranslatef" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTranslatef" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTranslatef" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTranslatef(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIsList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLboolean result;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIsList",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIsList" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLboolean)glIsList(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDeleteLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLsizei arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glDeleteLists",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDeleteLists" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDeleteLists" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDeleteLists(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGenLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glGenLists",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGenLists" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLuint)glGenLists(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNewList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glNewList",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNewList" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNewList" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNewList(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEndList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glEndList")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEndList();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCallList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glCallList",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCallList" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCallList(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCallLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLenum arg2 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glCallLists",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCallLists" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCallLists" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCallLists(arg1,arg2,(void const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glListBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glListBase",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glListBase" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glListBase(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glVertex2d",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex2d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2d(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glVertex2f",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex2f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2f(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glVertex2i",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex2i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex2i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2i(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glVertex2s",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex2s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex2s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2s(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glVertex3d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex3d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glVertex3f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex3f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glVertex3i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex3i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glVertex3s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex3s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glVertex4d",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex4d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex4d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex4d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glVertex4d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4d(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glVertex4f",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex4f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex4f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex4f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glVertex4f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4f(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glVertex4i",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex4i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex4i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex4i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glVertex4i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4i(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glVertex4s",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertex4s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertex4s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertex4s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glVertex4s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4s(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex2dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 2);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex2fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 2);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex2iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 2);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex2sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex2sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 2);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex2sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex3dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 3);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex3fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 3);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex3iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 3);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex3sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 3);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex3sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex4dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 4);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex4fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 4);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex4iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 4);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertex4sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glVertex4sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 4);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertex4sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte arg1 ;
+  GLbyte arg2 ;
+  GLbyte arg3 ;
+  signed char val1 ;
+  int ecode1 = 0 ;
+  signed char val2 ;
+  int ecode2 = 0 ;
+  signed char val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormal3b",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_signed_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormal3b" "', argument " "1"" of type '" "GLbyte""'");
+  } 
+  arg1 = (GLbyte)(val1);
+  ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormal3b" "', argument " "2"" of type '" "GLbyte""'");
+  } 
+  arg2 = (GLbyte)(val2);
+  ecode3 = SWIG_AsVal_signed_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glNormal3b" "', argument " "3"" of type '" "GLbyte""'");
+  } 
+  arg3 = (GLbyte)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3b(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormal3d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormal3d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormal3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glNormal3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormal3f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormal3f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormal3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glNormal3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormal3i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormal3i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormal3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glNormal3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormal3s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormal3s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormal3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glNormal3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3bv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glNormal3bv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLbyte", 3);
+        if (! array1) return NULL;
+        arg1 = (GLbyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3bv((signed char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glNormal3dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 3);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glNormal3fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 3);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glNormal3iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 3);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormal3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glNormal3sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 3);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormal3sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexd",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexd" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexd(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexf",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexf" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexf(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexi",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexi" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexi(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexs",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexs" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexs(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte arg1 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexub",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexub" "', argument " "1"" of type '" "GLubyte""'");
+  } 
+  arg1 = (GLubyte)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexub(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexdv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexdv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexdv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexfv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexfv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexiv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexiv((int const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexsv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexsv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexsv((short const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexubv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 = (GLubyte *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIndexubv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 0);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexubv((unsigned char const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte arg1 ;
+  GLbyte arg2 ;
+  GLbyte arg3 ;
+  signed char val1 ;
+  int ecode1 = 0 ;
+  signed char val2 ;
+  int ecode2 = 0 ;
+  signed char val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3b",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_signed_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3b" "', argument " "1"" of type '" "GLbyte""'");
+  } 
+  arg1 = (GLbyte)(val1);
+  ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3b" "', argument " "2"" of type '" "GLbyte""'");
+  } 
+  arg2 = (GLbyte)(val2);
+  ecode3 = SWIG_AsVal_signed_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3b" "', argument " "3"" of type '" "GLbyte""'");
+  } 
+  arg3 = (GLbyte)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3b(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte arg1 ;
+  GLubyte arg2 ;
+  GLubyte arg3 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  unsigned char val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3ub",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3ub" "', argument " "1"" of type '" "GLubyte""'");
+  } 
+  arg1 = (GLubyte)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3ub" "', argument " "2"" of type '" "GLubyte""'");
+  } 
+  arg2 = (GLubyte)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3ub" "', argument " "3"" of type '" "GLubyte""'");
+  } 
+  arg3 = (GLubyte)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3ub(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3ui(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLuint arg2 ;
+  GLuint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3ui",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3ui" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3ui" "', argument " "2"" of type '" "GLuint""'");
+  } 
+  arg2 = (GLuint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3ui" "', argument " "3"" of type '" "GLuint""'");
+  } 
+  arg3 = (GLuint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3ui(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3us(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLushort arg1 ;
+  GLushort arg2 ;
+  GLushort arg3 ;
+  unsigned short val1 ;
+  int ecode1 = 0 ;
+  unsigned short val2 ;
+  int ecode2 = 0 ;
+  unsigned short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColor3us",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor3us" "', argument " "1"" of type '" "GLushort""'");
+  } 
+  arg1 = (GLushort)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor3us" "', argument " "2"" of type '" "GLushort""'");
+  } 
+  arg2 = (GLushort)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor3us" "', argument " "3"" of type '" "GLushort""'");
+  } 
+  arg3 = (GLushort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3us(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte arg1 ;
+  GLbyte arg2 ;
+  GLbyte arg3 ;
+  GLbyte arg4 ;
+  signed char val1 ;
+  int ecode1 = 0 ;
+  signed char val2 ;
+  int ecode2 = 0 ;
+  signed char val3 ;
+  int ecode3 = 0 ;
+  signed char val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4b",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_signed_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4b" "', argument " "1"" of type '" "GLbyte""'");
+  } 
+  arg1 = (GLbyte)(val1);
+  ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4b" "', argument " "2"" of type '" "GLbyte""'");
+  } 
+  arg2 = (GLbyte)(val2);
+  ecode3 = SWIG_AsVal_signed_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4b" "', argument " "3"" of type '" "GLbyte""'");
+  } 
+  arg3 = (GLbyte)(val3);
+  ecode4 = SWIG_AsVal_signed_SS_char(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4b" "', argument " "4"" of type '" "GLbyte""'");
+  } 
+  arg4 = (GLbyte)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4b(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4d",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4d(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4f",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4f(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4i",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4i(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4s",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4s(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte arg1 ;
+  GLubyte arg2 ;
+  GLubyte arg3 ;
+  GLubyte arg4 ;
+  unsigned char val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  unsigned char val3 ;
+  int ecode3 = 0 ;
+  unsigned char val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4ub",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4ub" "', argument " "1"" of type '" "GLubyte""'");
+  } 
+  arg1 = (GLubyte)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4ub" "', argument " "2"" of type '" "GLubyte""'");
+  } 
+  arg2 = (GLubyte)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4ub" "', argument " "3"" of type '" "GLubyte""'");
+  } 
+  arg3 = (GLubyte)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4ub" "', argument " "4"" of type '" "GLubyte""'");
+  } 
+  arg4 = (GLubyte)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4ub(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4ui(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLuint arg2 ;
+  GLuint arg3 ;
+  GLuint arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4ui",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4ui" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4ui" "', argument " "2"" of type '" "GLuint""'");
+  } 
+  arg2 = (GLuint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4ui" "', argument " "3"" of type '" "GLuint""'");
+  } 
+  arg3 = (GLuint)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4ui" "', argument " "4"" of type '" "GLuint""'");
+  } 
+  arg4 = (GLuint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4ui(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4us(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLushort arg1 ;
+  GLushort arg2 ;
+  GLushort arg3 ;
+  GLushort arg4 ;
+  unsigned short val1 ;
+  int ecode1 = 0 ;
+  unsigned short val2 ;
+  int ecode2 = 0 ;
+  unsigned short val3 ;
+  int ecode3 = 0 ;
+  unsigned short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColor4us",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColor4us" "', argument " "1"" of type '" "GLushort""'");
+  } 
+  arg1 = (GLushort)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColor4us" "', argument " "2"" of type '" "GLushort""'");
+  } 
+  arg2 = (GLushort)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColor4us" "', argument " "3"" of type '" "GLushort""'");
+  } 
+  arg3 = (GLushort)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColor4us" "', argument " "4"" of type '" "GLushort""'");
+  } 
+  arg4 = (GLushort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4us(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3bv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3bv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLbyte", 3);
+        if (! array1) return NULL;
+        arg1 = (GLbyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3bv((signed char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 3);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 3);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 3);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 3);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3ubv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3ubv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 3);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3ubv((unsigned char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3uiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3uiv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLuint", 3);
+        if (! array1) return NULL;
+        arg1 = (GLuint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3uiv((unsigned int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor3usv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLushort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor3usv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLushort", 3);
+        if (! array1) return NULL;
+        arg1 = (GLushort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor3usv((unsigned short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4bv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLbyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4bv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLbyte", 4);
+        if (! array1) return NULL;
+        arg1 = (GLbyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4bv((signed char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 4);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 4);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 4);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 4);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4ubv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4ubv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 4);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4ubv((unsigned char const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4uiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4uiv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLuint", 4);
+        if (! array1) return NULL;
+        arg1 = (GLuint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4uiv((unsigned int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColor4usv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLushort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glColor4usv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLushort", 4);
+        if (! array1) return NULL;
+        arg1 = (GLushort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColor4usv((unsigned short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1d",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord1d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1d(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1f",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord1f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1f(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1i",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord1i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1i(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1s",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord1s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1s(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glTexCoord2d",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord2d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2d(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glTexCoord2f",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord2f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2f(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glTexCoord2i",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord2i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord2i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2i(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glTexCoord2s",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord2s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord2s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2s(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexCoord3d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord3d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexCoord3f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord3f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexCoord3i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord3i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexCoord3s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord3s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glTexCoord4d",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord4d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord4d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord4d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexCoord4d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4d(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glTexCoord4f",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord4f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord4f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord4f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexCoord4f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4f(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glTexCoord4i",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord4i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord4i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord4i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexCoord4i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4i(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glTexCoord4s",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoord4s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoord4s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoord4s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexCoord4s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4s(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1iv((int const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord1sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord1sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord1sv((short const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord2dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord2fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord2iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2iv((int const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord2sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord2sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord2sv((short const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord3dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord3fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord3iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3iv((int const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord3sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord3sv((short const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord4dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord4fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord4iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4iv((int const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoord4sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glTexCoord4sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoord4sv((short const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRasterPos2d",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos2d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2d(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRasterPos2f",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos2f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2f(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRasterPos2i",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos2i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos2i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2i(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRasterPos2s",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos2s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos2s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2s(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glRasterPos3d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos3d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glRasterPos3f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos3f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glRasterPos3i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos3i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glRasterPos3s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos3s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRasterPos4d",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos4d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos4d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos4d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRasterPos4d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4d(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRasterPos4f",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos4f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos4f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos4f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRasterPos4f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4f(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRasterPos4i",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos4i" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos4i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos4i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRasterPos4i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4i(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRasterPos4s",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRasterPos4s" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRasterPos4s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRasterPos4s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRasterPos4s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4s(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos2dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 2);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos2fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 2);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos2iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 2);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos2sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos2sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 2);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos2sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos3dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 3);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos3fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 3);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos3iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 3);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos3sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 3);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos3sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos4dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 4);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4dv((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos4fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 4);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4fv((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos4iv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 4);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4iv((int const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRasterPos4sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glRasterPos4sv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 4);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRasterPos4sv((short const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRectd",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRectd" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRectd" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRectd" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRectd" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectd(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRectf",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRectf" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRectf" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRectf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRectf" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectf(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRecti(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRecti",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRecti" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRecti" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRecti" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRecti" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRecti(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  short val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glRects",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_short(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glRects" "', argument " "1"" of type '" "GLshort""'");
+  } 
+  arg1 = (GLshort)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glRects" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glRects" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glRects" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRects(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectdv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRectdv",&obj0,&obj1)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectdv((double const *)arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRectfv",&obj0,&obj1)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectfv((float const *)arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint *arg1 = (GLint *) 0 ;
+  GLint *arg2 = (GLint *) 0 ;
+  PyArrayObject *array1 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRectiv",&obj0,&obj1)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLint", 0);
+        if (! array1) return NULL;
+        arg1 = (GLint *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectiv((int const *)arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glRectsv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLshort *arg1 = (GLshort *) 0 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  PyArrayObject *array1 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glRectsv",&obj0,&obj1)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLshort", 0);
+        if (! array1) return NULL;
+        arg1 = (GLshort *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glRectsv((short const *)arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glVertexPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glVertexPointer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glVertexPointer" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glVertexPointer" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glVertexPointer" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glVertexPointer(arg1,arg2,arg3,(void const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glNormalPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glNormalPointer",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glNormalPointer" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glNormalPointer" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glNormalPointer(arg1,arg2,(void const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glColorPointer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorPointer" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorPointer" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColorPointer" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorPointer(arg1,arg2,arg3,(void const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIndexPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glIndexPointer",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIndexPointer" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glIndexPointer" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glIndexPointer(arg1,arg2,(void const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexCoordPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glTexCoordPointer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexCoordPointer" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexCoordPointer" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexCoordPointer" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexCoordPointer(arg1,arg2,arg3,(void const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEdgeFlagPointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLvoid *arg2 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glEdgeFlagPointer",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEdgeFlagPointer" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEdgeFlagPointer(arg1,(void const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetPointerv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLvoid **arg2 = (GLvoid **) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetPointerv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetPointerv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_void, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glGetPointerv" "', argument " "2"" of type '" "GLvoid **""'"); 
+  }
+  arg2 = (GLvoid **)(argp2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetPointerv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glArrayElement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glArrayElement",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glArrayElement" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glArrayElement(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glDrawArrays",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawArrays" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDrawArrays" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glDrawArrays" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDrawArrays(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawElements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLenum arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glDrawElements",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawElements" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDrawElements" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glDrawElements" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDrawElements(arg1,arg2,arg3,(void const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glInterleavedArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glInterleavedArrays",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glInterleavedArrays" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glInterleavedArrays" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glInterleavedArrays(arg1,arg2,(void const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glShadeModel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glShadeModel",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glShadeModel" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glShadeModel(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glLightf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLightf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glLightf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLighti(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glLighti",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLighti" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLighti" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glLighti" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLighti(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glLightfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLightfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glLightiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLightiv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightiv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetLightfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetLightfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetLightfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetLightfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetLightfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetLightiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetLightiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetLightiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetLightiv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetLightiv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightModelf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glLightModelf",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightModelf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLightModelf" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightModelf(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightModeli(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glLightModeli",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightModeli" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glLightModeli" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightModeli(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightModelfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glLightModelfv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightModelfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightModelfv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLightModeliv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glLightModeliv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLightModeliv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLightModeliv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMaterialf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMaterialf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMaterialf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMaterialf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMaterialf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMaterialf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMateriali(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMateriali",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMateriali" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMateriali" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMateriali" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMateriali(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMaterialfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMaterialfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMaterialfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMaterialfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMaterialfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMaterialiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMaterialiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMaterialiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMaterialiv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMaterialiv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMaterialfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMaterialfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMaterialfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMaterialfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMaterialfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMaterialiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMaterialiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMaterialiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMaterialiv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMaterialiv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glColorMaterial",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorMaterial" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorMaterial" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorMaterial(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelZoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPixelZoom",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelZoom" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelZoom" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelZoom(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelStoref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPixelStoref",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelStoref" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelStoref" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelStoref(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelStorei(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPixelStorei",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelStorei" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelStorei" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelStorei(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelTransferf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPixelTransferf",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelTransferf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelTransferf" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelTransferf(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelTransferi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glPixelTransferi",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelTransferi" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelTransferi" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelTransferi(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelMapfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glPixelMapfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelMapfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelMapfv" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelMapfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelMapuiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLuint *arg3 = (GLuint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glPixelMapuiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelMapuiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelMapuiv" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLuint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLuint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelMapuiv(arg1,arg2,(unsigned int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPixelMapusv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLushort *arg3 = (GLushort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glPixelMapusv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPixelMapusv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glPixelMapusv" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLushort", 0);
+        if (! array3) return NULL;
+        arg3 = (GLushort *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPixelMapusv(arg1,arg2,(unsigned short const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetPixelMapfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetPixelMapfv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetPixelMapfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetPixelMapfv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetPixelMapuiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetPixelMapuiv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetPixelMapuiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetPixelMapuiv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetPixelMapusv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLushort *arg2 = (GLushort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGetPixelMapusv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetPixelMapusv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetPixelMapusv(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLsizei arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  GLfloat arg5 ;
+  GLfloat arg6 ;
+  GLubyte *arg7 = (GLubyte *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  float val5 ;
+  int ecode5 = 0 ;
+  float val6 ;
+  int ecode6 = 0 ;
+  PyArrayObject *array7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glBitmap",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBitmap" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glBitmap" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glBitmap" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glBitmap" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  ecode5 = SWIG_AsVal_float(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glBitmap" "', argument " "5"" of type '" "GLfloat""'");
+  } 
+  arg5 = (GLfloat)(val5);
+  ecode6 = SWIG_AsVal_float(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glBitmap" "', argument " "6"" of type '" "GLfloat""'");
+  } 
+  arg6 = (GLfloat)(val6);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj6))
+      {
+        int buffer_len;
+        array7 = NULL;
+        if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+        return NULL;
+        if (! arg7) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj6, &array7, "GLubyte", 0);
+        if (! array7) return NULL;
+        arg7 = (GLubyte *)array7->data;
+      }
+      /****
+          if (array7)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array7)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array7 = NULL;
+      if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+      return NULL;
+      if (! arg7) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBitmap(arg1,arg2,arg3,arg4,arg5,arg6,(unsigned char const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array7)
+    {
+      Py_DECREF(array7);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array7)
+    {
+      Py_DECREF(array7);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glReadPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  unsigned int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glReadPixels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glReadPixels" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glReadPixels" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glReadPixels" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glReadPixels" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glReadPixels" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glReadPixels" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj6, (void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glReadPixels(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLsizei arg2 ;
+  GLenum arg3 ;
+  GLenum arg4 ;
+  GLvoid *arg5 = (GLvoid *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glDrawPixels",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawPixels" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDrawPixels" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glDrawPixels" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glDrawPixels" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDrawPixels(arg1,arg2,arg3,arg4,(void const *)arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glCopyPixels",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyPixels" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyPixels" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyPixels" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyPixels" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyPixels" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyPixels(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glStencilFunc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLuint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glStencilFunc",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glStencilFunc" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glStencilFunc" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glStencilFunc" "', argument " "3"" of type '" "GLuint""'");
+  } 
+  arg3 = (GLuint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glStencilFunc(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glStencilMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glStencilMask",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glStencilMask" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glStencilMask(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glStencilOp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLenum arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glStencilOp",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glStencilOp" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glStencilOp" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glStencilOp" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glStencilOp(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClearStencil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClearStencil",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClearStencil" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClearStencil(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLdouble arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGend",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGend" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGend" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexGend" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGend(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGenf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGenf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGenf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGenf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexGenf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGenf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGeni(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGeni",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGeni" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGeni" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexGeni" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGeni(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGendv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLdouble *arg3 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGendv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGendv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGendv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLdouble", 0);
+        if (! array3) return NULL;
+        arg3 = (GLdouble *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGendv(arg1,arg2,(double const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGenfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGenfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGenfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGenfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGenfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexGeniv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexGeniv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexGeniv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexGeniv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexGeniv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexGendv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLdouble *arg3 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexGendv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexGendv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexGendv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexGendv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexGenfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexGenfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexGenfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexGenfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexGenfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexGeniv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexGeniv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexGeniv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexGeniv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexGeniv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexEnvf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexEnvf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexEnvf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexEnvf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexEnvf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexEnvf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexEnvi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexEnvi",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexEnvi" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexEnvi" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexEnvi" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexEnvi(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexEnvfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexEnvfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexEnvfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexEnvfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexEnvfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexEnviv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexEnviv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexEnviv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexEnviv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexEnviv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexEnvfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexEnvfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexEnvfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexEnvfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexEnvfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexEnviv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexEnviv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexEnviv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexEnviv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexEnviv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexParameterf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexParameterf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexParameterf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexParameterf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexParameterf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexParameterf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexParameteri(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexParameteri",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexParameteri" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexParameteri" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexParameteri" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexParameteri(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexParameterfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glTexParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexParameteriv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexParameterfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetTexParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexParameteriv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexLevelParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLfloat *arg4 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glGetTexLevelParameterfv",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexLevelParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexLevelParameterfv" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetTexLevelParameterfv" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexLevelParameterfv(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexLevelParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLint *arg4 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glGetTexLevelParameteriv",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexLevelParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexLevelParameteriv" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetTexLevelParameteriv" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexLevelParameteriv(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLsizei arg4 ;
+  GLint arg5 ;
+  GLenum arg6 ;
+  GLenum arg7 ;
+  GLvoid *arg8 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  unsigned int val6 ;
+  int ecode6 = 0 ;
+  unsigned int val7 ;
+  int ecode7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:glTexImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexImage1D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexImage1D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexImage1D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexImage1D" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glTexImage1D" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj7, (const void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexImage1D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(void const *)arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLint arg6 ;
+  GLenum arg7 ;
+  GLenum arg8 ;
+  GLvoid *arg9 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  unsigned int val7 ;
+  int ecode7 = 0 ;
+  unsigned int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:glTexImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexImage2D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexImage2D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexImage2D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexImage2D" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glTexImage2D" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  ecode8 = SWIG_AsVal_unsigned_SS_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glTexImage2D" "', argument " "8"" of type '" "GLenum""'");
+  } 
+  arg8 = (GLenum)(val8);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj8, (const void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(void const *)arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetTexImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLenum arg4 ;
+  GLvoid *arg5 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glGetTexImage",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetTexImage" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetTexImage" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetTexImage" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glGetTexImage" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetTexImage(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGenTextures(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glGenTextures",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGenTextures" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGenTextures(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDeleteTextures(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glDeleteTextures",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDeleteTextures" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLuint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLuint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDeleteTextures(arg1,(unsigned int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBindTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLuint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glBindTexture",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBindTexture" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glBindTexture" "', argument " "2"" of type '" "GLuint""'");
+  } 
+  arg2 = (GLuint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBindTexture(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPrioritizeTextures(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  GLclampf *arg3 = (GLclampf *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glPrioritizeTextures",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPrioritizeTextures" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLuint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLuint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPrioritizeTextures(arg1,(unsigned int const *)arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glAreTexturesResident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  GLboolean *arg3 = (GLboolean *) 0 ;
+  GLboolean result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glAreTexturesResident",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glAreTexturesResident" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLuint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLuint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLboolean)glAreTexturesResident(arg1,(unsigned int const *)arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glIsTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  GLboolean result;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glIsTexture",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glIsTexture" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLboolean)glIsTexture(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexSubImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  unsigned int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glTexSubImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexSubImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexSubImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexSubImage1D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexSubImage1D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexSubImage1D" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexSubImage1D" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexSubImage1D(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexSubImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  GLsizei arg6 ;
+  GLenum arg7 ;
+  GLenum arg8 ;
+  GLvoid *arg9 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  unsigned int val7 ;
+  int ecode7 = 0 ;
+  unsigned int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:glTexSubImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexSubImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexSubImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexSubImage2D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexSubImage2D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexSubImage2D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexSubImage2D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glTexSubImage2D" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  ecode8 = SWIG_AsVal_unsigned_SS_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glTexSubImage2D" "', argument " "8"" of type '" "GLenum""'");
+  } 
+  arg8 = (GLenum)(val8);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj8, (const void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexSubImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(void const *)arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyTexImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  GLint arg7 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glCopyTexImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyTexImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyTexImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyTexImage1D" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyTexImage1D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyTexImage1D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyTexImage1D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCopyTexImage1D" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyTexImage1D(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyTexImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  GLsizei arg7 ;
+  GLint arg8 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:glCopyTexImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyTexImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyTexImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyTexImage2D" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyTexImage2D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyTexImage2D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyTexImage2D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCopyTexImage2D" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCopyTexImage2D" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyTexImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyTexSubImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glCopyTexSubImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyTexSubImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyTexSubImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyTexSubImage1D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyTexSubImage1D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyTexSubImage1D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyTexSubImage1D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyTexSubImage1D(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyTexSubImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLint arg6 ;
+  GLsizei arg7 ;
+  GLsizei arg8 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:glCopyTexSubImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyTexSubImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyTexSubImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyTexSubImage2D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyTexSubImage2D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyTexSubImage2D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyTexSubImage2D" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCopyTexSubImage2D" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCopyTexSubImage2D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyTexSubImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMap1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLdouble *arg6 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyArrayObject *array6 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glMap1d",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMap1d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMap1d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMap1d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMap1d" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMap1d" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj5))
+      {
+        int buffer_len;
+        array6 = NULL;
+        if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+        return NULL;
+        if (! arg6) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj5, &array6, "GLdouble", 0);
+        if (! array6) return NULL;
+        arg6 = (GLdouble *)array6->data;
+      }
+      /****
+          if (array6)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array6)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array6 = NULL;
+      if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+      return NULL;
+      if (! arg6) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMap1d(arg1,arg2,arg3,arg4,arg5,(double const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMap1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLfloat *arg6 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyArrayObject *array6 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glMap1f",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMap1f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMap1f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMap1f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMap1f" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMap1f" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj5))
+      {
+        int buffer_len;
+        array6 = NULL;
+        if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+        return NULL;
+        if (! arg6) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj5, &array6, "GLfloat", 0);
+        if (! array6) return NULL;
+        arg6 = (GLfloat *)array6->data;
+      }
+      /****
+          if (array6)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array6)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array6 = NULL;
+      if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+      return NULL;
+      if (! arg6) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMap1f(arg1,arg2,arg3,arg4,arg5,(float const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMap2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLdouble arg6 ;
+  GLdouble arg7 ;
+  GLint arg8 ;
+  GLint arg9 ;
+  GLdouble *arg10 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  double val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  int val9 ;
+  int ecode9 = 0 ;
+  PyArrayObject *array10 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:glMap2d",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMap2d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMap2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMap2d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMap2d" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMap2d" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glMap2d" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  ecode7 = SWIG_AsVal_double(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glMap2d" "', argument " "7"" of type '" "GLdouble""'");
+  } 
+  arg7 = (GLdouble)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glMap2d" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  ecode9 = SWIG_AsVal_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glMap2d" "', argument " "9"" of type '" "GLint""'");
+  } 
+  arg9 = (GLint)(val9);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj9))
+      {
+        int buffer_len;
+        array10 = NULL;
+        if (PyObject_AsReadBuffer( obj9, (const void**)&arg10, &buffer_len))
+        return NULL;
+        if (! arg10) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj9, &array10, "GLdouble", 0);
+        if (! array10) return NULL;
+        arg10 = (GLdouble *)array10->data;
+      }
+      /****
+          if (array10)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array10)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array10 = NULL;
+      if (PyObject_AsReadBuffer( obj9, (const void**)&arg10, &buffer_len))
+      return NULL;
+      if (! arg10) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMap2d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(double const *)arg10);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array10)
+    {
+      Py_DECREF(array10);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array10)
+    {
+      Py_DECREF(array10);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMap2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLfloat arg6 ;
+  GLfloat arg7 ;
+  GLint arg8 ;
+  GLint arg9 ;
+  GLfloat *arg10 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  float val6 ;
+  int ecode6 = 0 ;
+  float val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  int val9 ;
+  int ecode9 = 0 ;
+  PyArrayObject *array10 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:glMap2f",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMap2f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMap2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMap2f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMap2f" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMap2f" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_float(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glMap2f" "', argument " "6"" of type '" "GLfloat""'");
+  } 
+  arg6 = (GLfloat)(val6);
+  ecode7 = SWIG_AsVal_float(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glMap2f" "', argument " "7"" of type '" "GLfloat""'");
+  } 
+  arg7 = (GLfloat)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glMap2f" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  ecode9 = SWIG_AsVal_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glMap2f" "', argument " "9"" of type '" "GLint""'");
+  } 
+  arg9 = (GLint)(val9);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj9))
+      {
+        int buffer_len;
+        array10 = NULL;
+        if (PyObject_AsReadBuffer( obj9, (const void**)&arg10, &buffer_len))
+        return NULL;
+        if (! arg10) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj9, &array10, "GLfloat", 0);
+        if (! array10) return NULL;
+        arg10 = (GLfloat *)array10->data;
+      }
+      /****
+          if (array10)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array10)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array10 = NULL;
+      if (PyObject_AsReadBuffer( obj9, (const void**)&arg10, &buffer_len))
+      return NULL;
+      if (! arg10) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMap2f(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(float const *)arg10);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array10)
+    {
+      Py_DECREF(array10);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array10)
+    {
+      Py_DECREF(array10);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMapdv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLdouble *arg3 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMapdv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMapdv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMapdv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMapdv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMapfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMapfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMapfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMapfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMapfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMapiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMapiv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMapiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMapiv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMapiv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord1d",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalCoord1d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord1d(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord1f",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalCoord1f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord1f(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord1dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord1dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord1dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord1fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord1fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord1fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glEvalCoord2d",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalCoord2d" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glEvalCoord2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord2d(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  GLfloat arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glEvalCoord2f",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalCoord2f" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glEvalCoord2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord2f(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord2dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 = (GLdouble *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord2dv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLdouble", 0);
+        if (! array1) return NULL;
+        arg1 = (GLdouble *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord2dv((double const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalCoord2fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 = (GLfloat *) 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalCoord2fv",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLfloat", 0);
+        if (! array1) return NULL;
+        arg1 = (GLfloat *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalCoord2fv((float const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMapGrid1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMapGrid1d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMapGrid1d" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMapGrid1d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMapGrid1d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMapGrid1d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMapGrid1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMapGrid1f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMapGrid1f" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMapGrid1f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMapGrid1f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMapGrid1f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMapGrid2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLdouble arg5 ;
+  GLdouble arg6 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glMapGrid2d",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMapGrid2d" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMapGrid2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMapGrid2d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMapGrid2d" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMapGrid2d" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glMapGrid2d" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMapGrid2d(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMapGrid2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLint arg4 ;
+  GLfloat arg5 ;
+  GLfloat arg6 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  float val5 ;
+  int ecode5 = 0 ;
+  float val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glMapGrid2f",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMapGrid2f" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMapGrid2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMapGrid2f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMapGrid2f" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_float(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMapGrid2f" "', argument " "5"" of type '" "GLfloat""'");
+  } 
+  arg5 = (GLfloat)(val5);
+  ecode6 = SWIG_AsVal_float(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glMapGrid2f" "', argument " "6"" of type '" "GLfloat""'");
+  } 
+  arg6 = (GLfloat)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMapGrid2f(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalPoint1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glEvalPoint1",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalPoint1" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalPoint1(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalPoint2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLint arg1 ;
+  GLint arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glEvalPoint2",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalPoint2" "', argument " "1"" of type '" "GLint""'");
+  } 
+  arg1 = (GLint)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glEvalPoint2" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalPoint2(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalMesh1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glEvalMesh1",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalMesh1" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glEvalMesh1" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glEvalMesh1" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalMesh1(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glEvalMesh2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glEvalMesh2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glEvalMesh2" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glEvalMesh2" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glEvalMesh2" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glEvalMesh2" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glEvalMesh2" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glEvalMesh2(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFogf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glFogf",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFogf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glFogf" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFogf(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFogi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glFogi",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFogi" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glFogi" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFogi(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFogfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glFogfv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFogfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFogfv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFogiv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glFogiv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFogiv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFogiv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glFeedbackBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glFeedbackBuffer",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glFeedbackBuffer" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glFeedbackBuffer" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glFeedbackBuffer(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPassThrough(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat arg1 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPassThrough",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPassThrough" "', argument " "1"" of type '" "GLfloat""'");
+  } 
+  arg1 = (GLfloat)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPassThrough(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glSelectBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLuint *arg2 = (GLuint *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glSelectBuffer",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glSelectBuffer" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glSelectBuffer(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glInitNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glInitNames")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glInitNames();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLoadName",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glLoadName" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadName(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPushName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLuint arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glPushName",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glPushName" "', argument " "1"" of type '" "GLuint""'");
+  } 
+  arg1 = (GLuint)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPushName(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glPopName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glPopName")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glPopName();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawRangeElements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLuint arg2 ;
+  GLuint arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLvoid *arg6 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glDrawRangeElements",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawRangeElements" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glDrawRangeElements" "', argument " "2"" of type '" "GLuint""'");
+  } 
+  arg2 = (GLuint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glDrawRangeElements" "', argument " "3"" of type '" "GLuint""'");
+  } 
+  arg3 = (GLuint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glDrawRangeElements" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glDrawRangeElements" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+    return NULL;
+    if (! arg6) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glDrawRangeElements(arg1,arg2,arg3,arg4,arg5,(void const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexImage3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLsizei arg6 ;
+  GLint arg7 ;
+  GLenum arg8 ;
+  GLenum arg9 ;
+  GLvoid *arg10 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  unsigned int val8 ;
+  int ecode8 = 0 ;
+  unsigned int val9 ;
+  int ecode9 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:glTexImage3D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexImage3D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexImage3D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexImage3D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexImage3D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexImage3D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexImage3D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glTexImage3D" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  ecode8 = SWIG_AsVal_unsigned_SS_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glTexImage3D" "', argument " "8"" of type '" "GLenum""'");
+  } 
+  arg8 = (GLenum)(val8);
+  ecode9 = SWIG_AsVal_unsigned_SS_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glTexImage3D" "', argument " "9"" of type '" "GLenum""'");
+  } 
+  arg9 = (GLenum)(val9);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj9, (const void**)&arg10, &buffer_len))
+    return NULL;
+    if (! arg10) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexImage3D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(void const *)arg10);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glTexSubImage3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  GLsizei arg7 ;
+  GLsizei arg8 ;
+  GLenum arg9 ;
+  GLenum arg10 ;
+  GLvoid *arg11 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  unsigned int val9 ;
+  int ecode9 = 0 ;
+  unsigned int val10 ;
+  int ecode10 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:glTexSubImage3D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glTexSubImage3D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glTexSubImage3D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glTexSubImage3D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glTexSubImage3D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glTexSubImage3D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glTexSubImage3D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glTexSubImage3D" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glTexSubImage3D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  ecode9 = SWIG_AsVal_unsigned_SS_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glTexSubImage3D" "', argument " "9"" of type '" "GLenum""'");
+  } 
+  arg9 = (GLenum)(val9);
+  ecode10 = SWIG_AsVal_unsigned_SS_int(obj9, &val10);
+  if (!SWIG_IsOK(ecode10)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "glTexSubImage3D" "', argument " "10"" of type '" "GLenum""'");
+  } 
+  arg10 = (GLenum)(val10);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj10, (const void**)&arg11, &buffer_len))
+    return NULL;
+    if (! arg11) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glTexSubImage3D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(void const *)arg11);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyTexSubImage3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLint arg6 ;
+  GLint arg7 ;
+  GLsizei arg8 ;
+  GLsizei arg9 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  int val9 ;
+  int ecode9 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:glCopyTexSubImage3D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyTexSubImage3D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyTexSubImage3D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyTexSubImage3D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyTexSubImage3D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyTexSubImage3D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyTexSubImage3D" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCopyTexSubImage3D" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCopyTexSubImage3D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  ecode9 = SWIG_AsVal_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glCopyTexSubImage3D" "', argument " "9"" of type '" "GLsizei""'");
+  } 
+  arg9 = (GLsizei)(val9);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyTexSubImage3D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  GLenum arg5 ;
+  GLvoid *arg6 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glColorTable",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorTable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorTable" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColorTable" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColorTable" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glColorTable" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+    return NULL;
+    if (! arg6) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorTable(arg1,arg2,arg3,arg4,arg5,(void const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorSubTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  GLenum arg5 ;
+  GLvoid *arg6 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glColorSubTable",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorSubTable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorSubTable" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glColorSubTable" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glColorSubTable" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glColorSubTable" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+    return NULL;
+    if (! arg6) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorSubTable(arg1,arg2,arg3,arg4,arg5,(void const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorTableParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColorTableParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorTableParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorTableParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorTableParameteriv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glColorTableParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glColorTableParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glColorTableParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glColorTableParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glColorTableParameterfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyColorSubTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glCopyColorSubTable",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyColorSubTable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyColorSubTable" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyColorSubTable" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyColorSubTable" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyColorSubTable" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyColorSubTable(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glCopyColorTable",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyColorTable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyColorTable" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyColorTable" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyColorTable" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyColorTable" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyColorTable(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLenum arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glGetColorTable",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetColorTable" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetColorTable" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetColorTable" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetColorTable(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetColorTableParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetColorTableParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetColorTableParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetColorTableParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetColorTableParameterfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetColorTableParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetColorTableParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetColorTableParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetColorTableParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetColorTableParameteriv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBlendEquation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glBlendEquation",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBlendEquation" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBlendEquation(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBlendColor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLclampf arg1 ;
+  GLclampf arg2 ;
+  GLclampf arg3 ;
+  GLclampf arg4 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glBlendColor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBlendColor" "', argument " "1"" of type '" "GLclampf""'");
+  } 
+  arg1 = (GLclampf)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glBlendColor" "', argument " "2"" of type '" "GLclampf""'");
+  } 
+  arg2 = (GLclampf)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glBlendColor" "', argument " "3"" of type '" "GLclampf""'");
+  } 
+  arg3 = (GLclampf)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glBlendColor" "', argument " "4"" of type '" "GLclampf""'");
+  } 
+  arg4 = (GLclampf)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBlendColor(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLenum arg3 ;
+  GLboolean arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned char val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glHistogram",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glHistogram" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glHistogram" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glHistogram" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glHistogram" "', argument " "4"" of type '" "GLboolean""'");
+  } 
+  arg4 = (GLboolean)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glHistogram(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glResetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glResetHistogram",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glResetHistogram" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glResetHistogram(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLboolean arg2 ;
+  GLenum arg3 ;
+  GLenum arg4 ;
+  GLvoid *arg5 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glGetHistogram",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetHistogram" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetHistogram" "', argument " "2"" of type '" "GLboolean""'");
+  } 
+  arg2 = (GLboolean)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetHistogram" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glGetHistogram" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetHistogram(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetHistogramParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetHistogramParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetHistogramParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetHistogramParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetHistogramParameterfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetHistogramParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetHistogramParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetHistogramParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetHistogramParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetHistogramParameteriv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMinmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLboolean arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned char val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMinmax",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMinmax" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMinmax" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMinmax" "', argument " "3"" of type '" "GLboolean""'");
+  } 
+  arg3 = (GLboolean)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMinmax(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glResetMinmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glResetMinmax",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glResetMinmax" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glResetMinmax(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMinmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLboolean arg2 ;
+  GLenum arg3 ;
+  GLenum arg4 ;
+  GLvoid *arg5 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glGetMinmax",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMinmax" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMinmax" "', argument " "2"" of type '" "GLboolean""'");
+  } 
+  arg2 = (GLboolean)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetMinmax" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glGetMinmax" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMinmax(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMinmaxParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMinmaxParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMinmaxParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMinmaxParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMinmaxParameterfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetMinmaxParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetMinmaxParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetMinmaxParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetMinmaxParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetMinmaxParameteriv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionFilter1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  GLenum arg5 ;
+  GLvoid *arg6 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  unsigned int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glConvolutionFilter1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionFilter1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionFilter1D" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glConvolutionFilter1D" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glConvolutionFilter1D" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glConvolutionFilter1D" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+    return NULL;
+    if (! arg6) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionFilter1D(arg1,arg2,arg3,arg4,arg5,(void const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionFilter2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  unsigned int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glConvolutionFilter2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionFilter2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionFilter2D" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glConvolutionFilter2D" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glConvolutionFilter2D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glConvolutionFilter2D" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glConvolutionFilter2D" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionFilter2D(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionParameterf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glConvolutionParameterf",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionParameterf" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionParameterf" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glConvolutionParameterf" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionParameterf(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glConvolutionParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionParameterfv(arg1,arg2,(float const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionParameteri(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glConvolutionParameteri",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionParameteri" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionParameteri" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glConvolutionParameteri" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionParameteri(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glConvolutionParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyArrayObject *array3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glConvolutionParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glConvolutionParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glConvolutionParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLint", 0);
+        if (! array3) return NULL;
+        arg3 = (GLint *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glConvolutionParameteriv(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyConvolutionFilter1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glCopyConvolutionFilter1D",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyConvolutionFilter1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyConvolutionFilter1D" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyConvolutionFilter1D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyConvolutionFilter1D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyConvolutionFilter1D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyConvolutionFilter1D(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCopyConvolutionFilter2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  GLsizei arg6 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glCopyConvolutionFilter2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCopyConvolutionFilter2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCopyConvolutionFilter2D" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCopyConvolutionFilter2D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCopyConvolutionFilter2D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCopyConvolutionFilter2D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCopyConvolutionFilter2D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCopyConvolutionFilter2D(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetConvolutionFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLenum arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glGetConvolutionFilter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetConvolutionFilter" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetConvolutionFilter" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetConvolutionFilter" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetConvolutionFilter(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetConvolutionParameterfv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetConvolutionParameterfv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetConvolutionParameterfv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetConvolutionParameterfv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetConvolutionParameterfv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetConvolutionParameteriv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLint *arg3 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetConvolutionParameteriv",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetConvolutionParameteriv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetConvolutionParameteriv" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetConvolutionParameteriv(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glSeparableFilter2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  GLvoid *arg8 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  unsigned int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:glSeparableFilter2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glSeparableFilter2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glSeparableFilter2D" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glSeparableFilter2D" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glSeparableFilter2D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glSeparableFilter2D" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glSeparableFilter2D" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj7, (const void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glSeparableFilter2D(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7,(void const *)arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetSeparableFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  GLenum arg3 ;
+  GLvoid *arg4 = (GLvoid *) 0 ;
+  GLvoid *arg5 = (GLvoid *) 0 ;
+  GLvoid *arg6 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glGetSeparableFilter",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetSeparableFilter" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetSeparableFilter" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glGetSeparableFilter" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj5, (void**)&arg6, &buffer_len))
+    return NULL;
+    if (! arg6) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetSeparableFilter(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glActiveTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glActiveTexture",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glActiveTexture" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glActiveTexture(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClientActiveTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClientActiveTexture",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClientActiveTexture" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClientActiveTexture(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLsizei arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glCompressedTexImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexImage1D" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexImage1D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexImage1D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexImage1D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexImage1D(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLint arg6 ;
+  GLsizei arg7 ;
+  GLvoid *arg8 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:glCompressedTexImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexImage2D" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexImage2D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexImage2D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexImage2D" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCompressedTexImage2D" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj7, (const void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(void const *)arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexImage3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLenum arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLsizei arg6 ;
+  GLint arg7 ;
+  GLsizei arg8 ;
+  GLvoid *arg9 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  unsigned int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:glCompressedTexImage3D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexImage3D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexImage3D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexImage3D" "', argument " "3"" of type '" "GLenum""'");
+  } 
+  arg3 = (GLenum)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexImage3D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexImage3D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexImage3D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCompressedTexImage3D" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCompressedTexImage3D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj8, (const void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexImage3D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(void const *)arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexSubImage1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLsizei arg6 ;
+  GLvoid *arg7 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  unsigned int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:glCompressedTexSubImage1D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexSubImage1D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexSubImage1D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexSubImage1D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexSubImage1D" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexSubImage1D" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexSubImage1D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexSubImage1D(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexSubImage2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLsizei arg5 ;
+  GLsizei arg6 ;
+  GLenum arg7 ;
+  GLsizei arg8 ;
+  GLvoid *arg9 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  unsigned int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:glCompressedTexSubImage2D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexSubImage2D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexSubImage2D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexSubImage2D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexSubImage2D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexSubImage2D" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexSubImage2D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCompressedTexSubImage2D" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCompressedTexSubImage2D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj8, (const void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexSubImage2D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(void const *)arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCompressedTexSubImage3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLsizei arg6 ;
+  GLsizei arg7 ;
+  GLsizei arg8 ;
+  GLenum arg9 ;
+  GLsizei arg10 ;
+  GLvoid *arg11 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  int val7 ;
+  int ecode7 = 0 ;
+  int val8 ;
+  int ecode8 = 0 ;
+  unsigned int val9 ;
+  int ecode9 = 0 ;
+  int val10 ;
+  int ecode10 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:glCompressedTexSubImage3D",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glCompressedTexSubImage3D" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glCompressedTexSubImage3D" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glCompressedTexSubImage3D" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glCompressedTexSubImage3D" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glCompressedTexSubImage3D" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_int(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glCompressedTexSubImage3D" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_int(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "glCompressedTexSubImage3D" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  ecode8 = SWIG_AsVal_int(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "glCompressedTexSubImage3D" "', argument " "8"" of type '" "GLsizei""'");
+  } 
+  arg8 = (GLsizei)(val8);
+  ecode9 = SWIG_AsVal_unsigned_SS_int(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "glCompressedTexSubImage3D" "', argument " "9"" of type '" "GLenum""'");
+  } 
+  arg9 = (GLenum)(val9);
+  ecode10 = SWIG_AsVal_int(obj9, &val10);
+  if (!SWIG_IsOK(ecode10)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "glCompressedTexSubImage3D" "', argument " "10"" of type '" "GLsizei""'");
+  } 
+  arg10 = (GLsizei)(val10);
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj10, (const void**)&arg11, &buffer_len))
+    return NULL;
+    if (! arg11) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glCompressedTexSubImage3D(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(void const *)arg11);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glGetCompressedTexImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glGetCompressedTexImage",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glGetCompressedTexImage" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glGetCompressedTexImage" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glGetCompressedTexImage(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1d",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1d(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1dv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1dv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1dv(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1f",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1f(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1fv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1fv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1fv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1i",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1i" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1i(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1iv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1iv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1iv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1s",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1s" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1s(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1sv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1sv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1sv(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2d",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2d(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2dv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2dv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2dv(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2f",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2f(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2fv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2fv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2fv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2i",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2i" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2i(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2iv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2iv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2iv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2s",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2s" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2s(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2sv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2sv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2sv(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3d",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3d(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3dv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3dv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3dv(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3f",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3f(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3fv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3fv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3fv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3i",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3i" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3i(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3iv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3iv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3iv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3s",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3s" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3s(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3sv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3sv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3sv(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4d",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4d" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4d" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4d" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4d" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4d" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4d(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4dv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4dv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4dv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4dv(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  GLfloat arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  float val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4f",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4f" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4f" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4f" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4f" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  ecode5 = SWIG_AsVal_float(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4f" "', argument " "5"" of type '" "GLfloat""'");
+  } 
+  arg5 = (GLfloat)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4f(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4fv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4fv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4fv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4fv(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4i",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4i" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4i" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4i" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4i" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4i" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4i(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4iv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4iv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4iv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4iv(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  GLshort arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  short val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4s",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4s" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4s" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4s" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4s" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  ecode5 = SWIG_AsVal_short(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4s" "', argument " "5"" of type '" "GLshort""'");
+  } 
+  arg5 = (GLshort)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4s(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4sv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4sv",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4sv" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4sv(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadTransposeMatrixd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLoadTransposeMatrixd",&obj0)) SWIG_fail;
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+    return NULL;
+    if (! arg1) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadTransposeMatrixd((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glLoadTransposeMatrixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glLoadTransposeMatrixf",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glLoadTransposeMatrixf" "', argument " "1"" of type '" "GLfloat const [16]""'"); 
+  } 
+  arg1 = (GLfloat *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glLoadTransposeMatrixf((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultTransposeMatrixd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble *arg1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glMultTransposeMatrixd",&obj0)) SWIG_fail;
+  {
+    int buffer_len;
+    if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+    return NULL;
+    if (! arg1) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultTransposeMatrixd((double const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultTransposeMatrixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLfloat *arg1 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glMultTransposeMatrixf",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glMultTransposeMatrixf" "', argument " "1"" of type '" "GLfloat const [16]""'"); 
+  } 
+  arg1 = (GLfloat *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultTransposeMatrixf((float const (*))arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glSampleCoverage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLclampf arg1 ;
+  GLboolean arg2 ;
+  float val1 ;
+  int ecode1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glSampleCoverage",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_float(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glSampleCoverage" "', argument " "1"" of type '" "GLclampf""'");
+  } 
+  arg1 = (GLclampf)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glSampleCoverage" "', argument " "2"" of type '" "GLboolean""'");
+  } 
+  arg2 = (GLboolean)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glSampleCoverage(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glActiveTextureARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glActiveTextureARB",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glActiveTextureARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glActiveTextureARB(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glClientActiveTextureARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glClientActiveTextureARB",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glClientActiveTextureARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glClientActiveTextureARB(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1dARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1dARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1dARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1dARB" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1dARB(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1dvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1dvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1dvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1dvARB(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1fARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1fARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1fARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1fARB" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1fARB(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1fvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1fvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1fvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1fvARB(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1iARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1iARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1iARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1iARB" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1iARB(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1ivARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1ivARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1ivARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1ivARB(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1sARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1sARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1sARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord1sARB" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1sARB(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord1svARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord1svARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord1svARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord1svARB(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2dARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2dARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2dARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2dARB" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2dARB" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2dARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2dvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2dvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2dvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2dvARB(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2fARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2fARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2fARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2fARB" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2fARB" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2fARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2fvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2fvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2fvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2fvARB(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2iARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2iARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2iARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2iARB" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2iARB" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2iARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2ivARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2ivARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2ivARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2ivARB(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2sARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glMultiTexCoord2sARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2sARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord2sARB" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord2sARB" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2sARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord2svARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord2svARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord2svARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord2svARB(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3dARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3dARB",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3dARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3dARB" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3dARB" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3dARB" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3dARB(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3dvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3dvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3dvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3dvARB(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3fARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3fARB",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3fARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3fARB" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3fARB" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3fARB" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3fARB(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3fvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3fvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3fvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3fvARB(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3iARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3iARB",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3iARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3iARB" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3iARB" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3iARB" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3iARB(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3ivARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3ivARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3ivARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3ivARB(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3sARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glMultiTexCoord3sARB",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3sARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord3sARB" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord3sARB" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord3sARB" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3sARB(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord3svARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord3svARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord3svARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord3svARB(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4dARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4dARB",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4dARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4dARB" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4dARB" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4dARB" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4dARB" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4dARB(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4dvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4dvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4dvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLdouble", 0);
+        if (! array2) return NULL;
+        arg2 = (GLdouble *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4dvARB(arg1,(double const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4fARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  GLfloat arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  float val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4fARB",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4fARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4fARB" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4fARB" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4fARB" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  ecode5 = SWIG_AsVal_float(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4fARB" "', argument " "5"" of type '" "GLfloat""'");
+  } 
+  arg5 = (GLfloat)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4fARB(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4fvARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4fvARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4fvARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4fvARB(arg1,(float const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4iARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4iARB",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4iARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4iARB" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4iARB" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4iARB" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4iARB" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4iARB(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4ivARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint *arg2 = (GLint *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4ivARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4ivARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLint", 0);
+        if (! array2) return NULL;
+        arg2 = (GLint *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4ivARB(arg1,(int const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4sARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort arg2 ;
+  GLshort arg3 ;
+  GLshort arg4 ;
+  GLshort arg5 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  short val2 ;
+  int ecode2 = 0 ;
+  short val3 ;
+  int ecode3 = 0 ;
+  short val4 ;
+  int ecode4 = 0 ;
+  short val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glMultiTexCoord4sARB",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4sARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_short(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glMultiTexCoord4sARB" "', argument " "2"" of type '" "GLshort""'");
+  } 
+  arg2 = (GLshort)(val2);
+  ecode3 = SWIG_AsVal_short(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glMultiTexCoord4sARB" "', argument " "3"" of type '" "GLshort""'");
+  } 
+  arg3 = (GLshort)(val3);
+  ecode4 = SWIG_AsVal_short(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glMultiTexCoord4sARB" "', argument " "4"" of type '" "GLshort""'");
+  } 
+  arg4 = (GLshort)(val4);
+  ecode5 = SWIG_AsVal_short(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glMultiTexCoord4sARB" "', argument " "5"" of type '" "GLshort""'");
+  } 
+  arg5 = (GLshort)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4sARB(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glMultiTexCoord4svARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLshort *arg2 = (GLshort *) 0 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glMultiTexCoord4svARB",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glMultiTexCoord4svARB" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLshort", 0);
+        if (! array2) return NULL;
+        arg2 = (GLshort *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glMultiTexCoord4svARB(arg1,(short const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glBlendEquationSeparateATI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLenum arg2 ;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glBlendEquationSeparateATI",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glBlendEquationSeparateATI" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glBlendEquationSeparateATI" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glBlendEquationSeparateATI(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"glBegin", gl_begin, METH_VARARGS, NULL},
+	 { (char *)"glEnd", gl_end, METH_VARARGS, NULL},
+	 { (char *)"glGetError", stableGetError, METH_VARARGS, NULL},
+	 { (char *)"glClearIndex", _wrap_glClearIndex, METH_VARARGS, NULL},
+	 { (char *)"glClearColor", _wrap_glClearColor, METH_VARARGS, NULL},
+	 { (char *)"glClear", _wrap_glClear, METH_VARARGS, NULL},
+	 { (char *)"glIndexMask", _wrap_glIndexMask, METH_VARARGS, NULL},
+	 { (char *)"glColorMask", _wrap_glColorMask, METH_VARARGS, NULL},
+	 { (char *)"glAlphaFunc", _wrap_glAlphaFunc, METH_VARARGS, NULL},
+	 { (char *)"glBlendFunc", _wrap_glBlendFunc, METH_VARARGS, NULL},
+	 { (char *)"glLogicOp", _wrap_glLogicOp, METH_VARARGS, NULL},
+	 { (char *)"glCullFace", _wrap_glCullFace, METH_VARARGS, NULL},
+	 { (char *)"glFrontFace", _wrap_glFrontFace, METH_VARARGS, NULL},
+	 { (char *)"glPointSize", _wrap_glPointSize, METH_VARARGS, NULL},
+	 { (char *)"glLineWidth", _wrap_glLineWidth, METH_VARARGS, NULL},
+	 { (char *)"glLineStipple", _wrap_glLineStipple, METH_VARARGS, NULL},
+	 { (char *)"glPolygonMode", _wrap_glPolygonMode, METH_VARARGS, NULL},
+	 { (char *)"glPolygonOffset", _wrap_glPolygonOffset, METH_VARARGS, NULL},
+	 { (char *)"glPolygonStipple", _wrap_glPolygonStipple, METH_VARARGS, NULL},
+	 { (char *)"glGetPolygonStipple", _wrap_glGetPolygonStipple, METH_VARARGS, NULL},
+	 { (char *)"glEdgeFlag", _wrap_glEdgeFlag, METH_VARARGS, NULL},
+	 { (char *)"glEdgeFlagv", _wrap_glEdgeFlagv, METH_VARARGS, NULL},
+	 { (char *)"glScissor", _wrap_glScissor, METH_VARARGS, NULL},
+	 { (char *)"glClipPlane", _wrap_glClipPlane, METH_VARARGS, NULL},
+	 { (char *)"glGetClipPlane", _wrap_glGetClipPlane, METH_VARARGS, NULL},
+	 { (char *)"glDrawBuffer", _wrap_glDrawBuffer, METH_VARARGS, NULL},
+	 { (char *)"glReadBuffer", _wrap_glReadBuffer, METH_VARARGS, NULL},
+	 { (char *)"glEnable", _wrap_glEnable, METH_VARARGS, NULL},
+	 { (char *)"glDisable", _wrap_glDisable, METH_VARARGS, NULL},
+	 { (char *)"glIsEnabled", _wrap_glIsEnabled, METH_VARARGS, NULL},
+	 { (char *)"glEnableClientState", _wrap_glEnableClientState, METH_VARARGS, NULL},
+	 { (char *)"glDisableClientState", _wrap_glDisableClientState, METH_VARARGS, NULL},
+	 { (char *)"glGetBooleanv", _wrap_glGetBooleanv, METH_VARARGS, NULL},
+	 { (char *)"glGetDoublev", _wrap_glGetDoublev, METH_VARARGS, NULL},
+	 { (char *)"glGetFloatv", _wrap_glGetFloatv, METH_VARARGS, NULL},
+	 { (char *)"glGetIntegerv", _wrap_glGetIntegerv, METH_VARARGS, NULL},
+	 { (char *)"glPushAttrib", _wrap_glPushAttrib, METH_VARARGS, NULL},
+	 { (char *)"glPopAttrib", _wrap_glPopAttrib, METH_VARARGS, NULL},
+	 { (char *)"glPushClientAttrib", _wrap_glPushClientAttrib, METH_VARARGS, NULL},
+	 { (char *)"glPopClientAttrib", _wrap_glPopClientAttrib, METH_VARARGS, NULL},
+	 { (char *)"glRenderMode", _wrap_glRenderMode, METH_VARARGS, NULL},
+	 { (char *)"glGetString", _wrap_glGetString, METH_VARARGS, NULL},
+	 { (char *)"glFinish", _wrap_glFinish, METH_VARARGS, NULL},
+	 { (char *)"glFlush", _wrap_glFlush, METH_VARARGS, NULL},
+	 { (char *)"glHint", _wrap_glHint, METH_VARARGS, NULL},
+	 { (char *)"glClearDepth", _wrap_glClearDepth, METH_VARARGS, NULL},
+	 { (char *)"glDepthFunc", _wrap_glDepthFunc, METH_VARARGS, NULL},
+	 { (char *)"glDepthMask", _wrap_glDepthMask, METH_VARARGS, NULL},
+	 { (char *)"glDepthRange", _wrap_glDepthRange, METH_VARARGS, NULL},
+	 { (char *)"glClearAccum", _wrap_glClearAccum, METH_VARARGS, NULL},
+	 { (char *)"glAccum", _wrap_glAccum, METH_VARARGS, NULL},
+	 { (char *)"glMatrixMode", _wrap_glMatrixMode, METH_VARARGS, NULL},
+	 { (char *)"glOrtho", _wrap_glOrtho, METH_VARARGS, NULL},
+	 { (char *)"glFrustum", _wrap_glFrustum, METH_VARARGS, NULL},
+	 { (char *)"glViewport", _wrap_glViewport, METH_VARARGS, NULL},
+	 { (char *)"glPushMatrix", _wrap_glPushMatrix, METH_VARARGS, NULL},
+	 { (char *)"glPopMatrix", _wrap_glPopMatrix, METH_VARARGS, NULL},
+	 { (char *)"glLoadIdentity", _wrap_glLoadIdentity, METH_VARARGS, NULL},
+	 { (char *)"glLoadMatrixd", _wrap_glLoadMatrixd, METH_VARARGS, NULL},
+	 { (char *)"glLoadMatrixf", _wrap_glLoadMatrixf, METH_VARARGS, NULL},
+	 { (char *)"glMultMatrixd", _wrap_glMultMatrixd, METH_VARARGS, NULL},
+	 { (char *)"glMultMatrixf", _wrap_glMultMatrixf, METH_VARARGS, NULL},
+	 { (char *)"glRotated", _wrap_glRotated, METH_VARARGS, NULL},
+	 { (char *)"glRotatef", _wrap_glRotatef, METH_VARARGS, NULL},
+	 { (char *)"glScaled", _wrap_glScaled, METH_VARARGS, NULL},
+	 { (char *)"glScalef", _wrap_glScalef, METH_VARARGS, NULL},
+	 { (char *)"glTranslated", _wrap_glTranslated, METH_VARARGS, NULL},
+	 { (char *)"glTranslatef", _wrap_glTranslatef, METH_VARARGS, NULL},
+	 { (char *)"glIsList", _wrap_glIsList, METH_VARARGS, NULL},
+	 { (char *)"glDeleteLists", _wrap_glDeleteLists, METH_VARARGS, NULL},
+	 { (char *)"glGenLists", _wrap_glGenLists, METH_VARARGS, NULL},
+	 { (char *)"glNewList", _wrap_glNewList, METH_VARARGS, NULL},
+	 { (char *)"glEndList", _wrap_glEndList, METH_VARARGS, NULL},
+	 { (char *)"glCallList", _wrap_glCallList, METH_VARARGS, NULL},
+	 { (char *)"glCallLists", _wrap_glCallLists, METH_VARARGS, NULL},
+	 { (char *)"glListBase", _wrap_glListBase, METH_VARARGS, NULL},
+	 { (char *)"glVertex2d", _wrap_glVertex2d, METH_VARARGS, NULL},
+	 { (char *)"glVertex2f", _wrap_glVertex2f, METH_VARARGS, NULL},
+	 { (char *)"glVertex2i", _wrap_glVertex2i, METH_VARARGS, NULL},
+	 { (char *)"glVertex2s", _wrap_glVertex2s, METH_VARARGS, NULL},
+	 { (char *)"glVertex3d", _wrap_glVertex3d, METH_VARARGS, NULL},
+	 { (char *)"glVertex3f", _wrap_glVertex3f, METH_VARARGS, NULL},
+	 { (char *)"glVertex3i", _wrap_glVertex3i, METH_VARARGS, NULL},
+	 { (char *)"glVertex3s", _wrap_glVertex3s, METH_VARARGS, NULL},
+	 { (char *)"glVertex4d", _wrap_glVertex4d, METH_VARARGS, NULL},
+	 { (char *)"glVertex4f", _wrap_glVertex4f, METH_VARARGS, NULL},
+	 { (char *)"glVertex4i", _wrap_glVertex4i, METH_VARARGS, NULL},
+	 { (char *)"glVertex4s", _wrap_glVertex4s, METH_VARARGS, NULL},
+	 { (char *)"glVertex2dv", _wrap_glVertex2dv, METH_VARARGS, NULL},
+	 { (char *)"glVertex2fv", _wrap_glVertex2fv, METH_VARARGS, NULL},
+	 { (char *)"glVertex2iv", _wrap_glVertex2iv, METH_VARARGS, NULL},
+	 { (char *)"glVertex2sv", _wrap_glVertex2sv, METH_VARARGS, NULL},
+	 { (char *)"glVertex3dv", _wrap_glVertex3dv, METH_VARARGS, NULL},
+	 { (char *)"glVertex3fv", _wrap_glVertex3fv, METH_VARARGS, NULL},
+	 { (char *)"glVertex3iv", _wrap_glVertex3iv, METH_VARARGS, NULL},
+	 { (char *)"glVertex3sv", _wrap_glVertex3sv, METH_VARARGS, NULL},
+	 { (char *)"glVertex4dv", _wrap_glVertex4dv, METH_VARARGS, NULL},
+	 { (char *)"glVertex4fv", _wrap_glVertex4fv, METH_VARARGS, NULL},
+	 { (char *)"glVertex4iv", _wrap_glVertex4iv, METH_VARARGS, NULL},
+	 { (char *)"glVertex4sv", _wrap_glVertex4sv, METH_VARARGS, NULL},
+	 { (char *)"glNormal3b", _wrap_glNormal3b, METH_VARARGS, NULL},
+	 { (char *)"glNormal3d", _wrap_glNormal3d, METH_VARARGS, NULL},
+	 { (char *)"glNormal3f", _wrap_glNormal3f, METH_VARARGS, NULL},
+	 { (char *)"glNormal3i", _wrap_glNormal3i, METH_VARARGS, NULL},
+	 { (char *)"glNormal3s", _wrap_glNormal3s, METH_VARARGS, NULL},
+	 { (char *)"glNormal3bv", _wrap_glNormal3bv, METH_VARARGS, NULL},
+	 { (char *)"glNormal3dv", _wrap_glNormal3dv, METH_VARARGS, NULL},
+	 { (char *)"glNormal3fv", _wrap_glNormal3fv, METH_VARARGS, NULL},
+	 { (char *)"glNormal3iv", _wrap_glNormal3iv, METH_VARARGS, NULL},
+	 { (char *)"glNormal3sv", _wrap_glNormal3sv, METH_VARARGS, NULL},
+	 { (char *)"glIndexd", _wrap_glIndexd, METH_VARARGS, NULL},
+	 { (char *)"glIndexf", _wrap_glIndexf, METH_VARARGS, NULL},
+	 { (char *)"glIndexi", _wrap_glIndexi, METH_VARARGS, NULL},
+	 { (char *)"glIndexs", _wrap_glIndexs, METH_VARARGS, NULL},
+	 { (char *)"glIndexub", _wrap_glIndexub, METH_VARARGS, NULL},
+	 { (char *)"glIndexdv", _wrap_glIndexdv, METH_VARARGS, NULL},
+	 { (char *)"glIndexfv", _wrap_glIndexfv, METH_VARARGS, NULL},
+	 { (char *)"glIndexiv", _wrap_glIndexiv, METH_VARARGS, NULL},
+	 { (char *)"glIndexsv", _wrap_glIndexsv, METH_VARARGS, NULL},
+	 { (char *)"glIndexubv", _wrap_glIndexubv, METH_VARARGS, NULL},
+	 { (char *)"glColor3b", _wrap_glColor3b, METH_VARARGS, NULL},
+	 { (char *)"glColor3d", _wrap_glColor3d, METH_VARARGS, NULL},
+	 { (char *)"glColor3f", _wrap_glColor3f, METH_VARARGS, NULL},
+	 { (char *)"glColor3i", _wrap_glColor3i, METH_VARARGS, NULL},
+	 { (char *)"glColor3s", _wrap_glColor3s, METH_VARARGS, NULL},
+	 { (char *)"glColor3ub", _wrap_glColor3ub, METH_VARARGS, NULL},
+	 { (char *)"glColor3ui", _wrap_glColor3ui, METH_VARARGS, NULL},
+	 { (char *)"glColor3us", _wrap_glColor3us, METH_VARARGS, NULL},
+	 { (char *)"glColor4b", _wrap_glColor4b, METH_VARARGS, NULL},
+	 { (char *)"glColor4d", _wrap_glColor4d, METH_VARARGS, NULL},
+	 { (char *)"glColor4f", _wrap_glColor4f, METH_VARARGS, NULL},
+	 { (char *)"glColor4i", _wrap_glColor4i, METH_VARARGS, NULL},
+	 { (char *)"glColor4s", _wrap_glColor4s, METH_VARARGS, NULL},
+	 { (char *)"glColor4ub", _wrap_glColor4ub, METH_VARARGS, NULL},
+	 { (char *)"glColor4ui", _wrap_glColor4ui, METH_VARARGS, NULL},
+	 { (char *)"glColor4us", _wrap_glColor4us, METH_VARARGS, NULL},
+	 { (char *)"glColor3bv", _wrap_glColor3bv, METH_VARARGS, NULL},
+	 { (char *)"glColor3dv", _wrap_glColor3dv, METH_VARARGS, NULL},
+	 { (char *)"glColor3fv", _wrap_glColor3fv, METH_VARARGS, NULL},
+	 { (char *)"glColor3iv", _wrap_glColor3iv, METH_VARARGS, NULL},
+	 { (char *)"glColor3sv", _wrap_glColor3sv, METH_VARARGS, NULL},
+	 { (char *)"glColor3ubv", _wrap_glColor3ubv, METH_VARARGS, NULL},
+	 { (char *)"glColor3uiv", _wrap_glColor3uiv, METH_VARARGS, NULL},
+	 { (char *)"glColor3usv", _wrap_glColor3usv, METH_VARARGS, NULL},
+	 { (char *)"glColor4bv", _wrap_glColor4bv, METH_VARARGS, NULL},
+	 { (char *)"glColor4dv", _wrap_glColor4dv, METH_VARARGS, NULL},
+	 { (char *)"glColor4fv", _wrap_glColor4fv, METH_VARARGS, NULL},
+	 { (char *)"glColor4iv", _wrap_glColor4iv, METH_VARARGS, NULL},
+	 { (char *)"glColor4sv", _wrap_glColor4sv, METH_VARARGS, NULL},
+	 { (char *)"glColor4ubv", _wrap_glColor4ubv, METH_VARARGS, NULL},
+	 { (char *)"glColor4uiv", _wrap_glColor4uiv, METH_VARARGS, NULL},
+	 { (char *)"glColor4usv", _wrap_glColor4usv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1d", _wrap_glTexCoord1d, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1f", _wrap_glTexCoord1f, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1i", _wrap_glTexCoord1i, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1s", _wrap_glTexCoord1s, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2d", _wrap_glTexCoord2d, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2f", _wrap_glTexCoord2f, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2i", _wrap_glTexCoord2i, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2s", _wrap_glTexCoord2s, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3d", _wrap_glTexCoord3d, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3f", _wrap_glTexCoord3f, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3i", _wrap_glTexCoord3i, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3s", _wrap_glTexCoord3s, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4d", _wrap_glTexCoord4d, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4f", _wrap_glTexCoord4f, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4i", _wrap_glTexCoord4i, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4s", _wrap_glTexCoord4s, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1dv", _wrap_glTexCoord1dv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1fv", _wrap_glTexCoord1fv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1iv", _wrap_glTexCoord1iv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord1sv", _wrap_glTexCoord1sv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2dv", _wrap_glTexCoord2dv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2fv", _wrap_glTexCoord2fv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2iv", _wrap_glTexCoord2iv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord2sv", _wrap_glTexCoord2sv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3dv", _wrap_glTexCoord3dv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3fv", _wrap_glTexCoord3fv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3iv", _wrap_glTexCoord3iv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord3sv", _wrap_glTexCoord3sv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4dv", _wrap_glTexCoord4dv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4fv", _wrap_glTexCoord4fv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4iv", _wrap_glTexCoord4iv, METH_VARARGS, NULL},
+	 { (char *)"glTexCoord4sv", _wrap_glTexCoord4sv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2d", _wrap_glRasterPos2d, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2f", _wrap_glRasterPos2f, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2i", _wrap_glRasterPos2i, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2s", _wrap_glRasterPos2s, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3d", _wrap_glRasterPos3d, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3f", _wrap_glRasterPos3f, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3i", _wrap_glRasterPos3i, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3s", _wrap_glRasterPos3s, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4d", _wrap_glRasterPos4d, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4f", _wrap_glRasterPos4f, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4i", _wrap_glRasterPos4i, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4s", _wrap_glRasterPos4s, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2dv", _wrap_glRasterPos2dv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2fv", _wrap_glRasterPos2fv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2iv", _wrap_glRasterPos2iv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos2sv", _wrap_glRasterPos2sv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3dv", _wrap_glRasterPos3dv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3fv", _wrap_glRasterPos3fv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3iv", _wrap_glRasterPos3iv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos3sv", _wrap_glRasterPos3sv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4dv", _wrap_glRasterPos4dv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4fv", _wrap_glRasterPos4fv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4iv", _wrap_glRasterPos4iv, METH_VARARGS, NULL},
+	 { (char *)"glRasterPos4sv", _wrap_glRasterPos4sv, METH_VARARGS, NULL},
+	 { (char *)"glRectd", _wrap_glRectd, METH_VARARGS, NULL},
+	 { (char *)"glRectf", _wrap_glRectf, METH_VARARGS, NULL},
+	 { (char *)"glRecti", _wrap_glRecti, METH_VARARGS, NULL},
+	 { (char *)"glRects", _wrap_glRects, METH_VARARGS, NULL},
+	 { (char *)"glRectdv", _wrap_glRectdv, METH_VARARGS, NULL},
+	 { (char *)"glRectfv", _wrap_glRectfv, METH_VARARGS, NULL},
+	 { (char *)"glRectiv", _wrap_glRectiv, METH_VARARGS, NULL},
+	 { (char *)"glRectsv", _wrap_glRectsv, METH_VARARGS, NULL},
+	 { (char *)"glVertexPointer", _wrap_glVertexPointer, METH_VARARGS, NULL},
+	 { (char *)"glNormalPointer", _wrap_glNormalPointer, METH_VARARGS, NULL},
+	 { (char *)"glColorPointer", _wrap_glColorPointer, METH_VARARGS, NULL},
+	 { (char *)"glIndexPointer", _wrap_glIndexPointer, METH_VARARGS, NULL},
+	 { (char *)"glTexCoordPointer", _wrap_glTexCoordPointer, METH_VARARGS, NULL},
+	 { (char *)"glEdgeFlagPointer", _wrap_glEdgeFlagPointer, METH_VARARGS, NULL},
+	 { (char *)"glGetPointerv", _wrap_glGetPointerv, METH_VARARGS, NULL},
+	 { (char *)"glArrayElement", _wrap_glArrayElement, METH_VARARGS, NULL},
+	 { (char *)"glDrawArrays", _wrap_glDrawArrays, METH_VARARGS, NULL},
+	 { (char *)"glDrawElements", _wrap_glDrawElements, METH_VARARGS, NULL},
+	 { (char *)"glInterleavedArrays", _wrap_glInterleavedArrays, METH_VARARGS, NULL},
+	 { (char *)"glShadeModel", _wrap_glShadeModel, METH_VARARGS, NULL},
+	 { (char *)"glLightf", _wrap_glLightf, METH_VARARGS, NULL},
+	 { (char *)"glLighti", _wrap_glLighti, METH_VARARGS, NULL},
+	 { (char *)"glLightfv", _wrap_glLightfv, METH_VARARGS, NULL},
+	 { (char *)"glLightiv", _wrap_glLightiv, METH_VARARGS, NULL},
+	 { (char *)"glGetLightfv", _wrap_glGetLightfv, METH_VARARGS, NULL},
+	 { (char *)"glGetLightiv", _wrap_glGetLightiv, METH_VARARGS, NULL},
+	 { (char *)"glLightModelf", _wrap_glLightModelf, METH_VARARGS, NULL},
+	 { (char *)"glLightModeli", _wrap_glLightModeli, METH_VARARGS, NULL},
+	 { (char *)"glLightModelfv", _wrap_glLightModelfv, METH_VARARGS, NULL},
+	 { (char *)"glLightModeliv", _wrap_glLightModeliv, METH_VARARGS, NULL},
+	 { (char *)"glMaterialf", _wrap_glMaterialf, METH_VARARGS, NULL},
+	 { (char *)"glMateriali", _wrap_glMateriali, METH_VARARGS, NULL},
+	 { (char *)"glMaterialfv", _wrap_glMaterialfv, METH_VARARGS, NULL},
+	 { (char *)"glMaterialiv", _wrap_glMaterialiv, METH_VARARGS, NULL},
+	 { (char *)"glGetMaterialfv", _wrap_glGetMaterialfv, METH_VARARGS, NULL},
+	 { (char *)"glGetMaterialiv", _wrap_glGetMaterialiv, METH_VARARGS, NULL},
+	 { (char *)"glColorMaterial", _wrap_glColorMaterial, METH_VARARGS, NULL},
+	 { (char *)"glPixelZoom", _wrap_glPixelZoom, METH_VARARGS, NULL},
+	 { (char *)"glPixelStoref", _wrap_glPixelStoref, METH_VARARGS, NULL},
+	 { (char *)"glPixelStorei", _wrap_glPixelStorei, METH_VARARGS, NULL},
+	 { (char *)"glPixelTransferf", _wrap_glPixelTransferf, METH_VARARGS, NULL},
+	 { (char *)"glPixelTransferi", _wrap_glPixelTransferi, METH_VARARGS, NULL},
+	 { (char *)"glPixelMapfv", _wrap_glPixelMapfv, METH_VARARGS, NULL},
+	 { (char *)"glPixelMapuiv", _wrap_glPixelMapuiv, METH_VARARGS, NULL},
+	 { (char *)"glPixelMapusv", _wrap_glPixelMapusv, METH_VARARGS, NULL},
+	 { (char *)"glGetPixelMapfv", _wrap_glGetPixelMapfv, METH_VARARGS, NULL},
+	 { (char *)"glGetPixelMapuiv", _wrap_glGetPixelMapuiv, METH_VARARGS, NULL},
+	 { (char *)"glGetPixelMapusv", _wrap_glGetPixelMapusv, METH_VARARGS, NULL},
+	 { (char *)"glBitmap", _wrap_glBitmap, METH_VARARGS, NULL},
+	 { (char *)"glReadPixels", _wrap_glReadPixels, METH_VARARGS, NULL},
+	 { (char *)"glDrawPixels", _wrap_glDrawPixels, METH_VARARGS, NULL},
+	 { (char *)"glCopyPixels", _wrap_glCopyPixels, METH_VARARGS, NULL},
+	 { (char *)"glStencilFunc", _wrap_glStencilFunc, METH_VARARGS, NULL},
+	 { (char *)"glStencilMask", _wrap_glStencilMask, METH_VARARGS, NULL},
+	 { (char *)"glStencilOp", _wrap_glStencilOp, METH_VARARGS, NULL},
+	 { (char *)"glClearStencil", _wrap_glClearStencil, METH_VARARGS, NULL},
+	 { (char *)"glTexGend", _wrap_glTexGend, METH_VARARGS, NULL},
+	 { (char *)"glTexGenf", _wrap_glTexGenf, METH_VARARGS, NULL},
+	 { (char *)"glTexGeni", _wrap_glTexGeni, METH_VARARGS, NULL},
+	 { (char *)"glTexGendv", _wrap_glTexGendv, METH_VARARGS, NULL},
+	 { (char *)"glTexGenfv", _wrap_glTexGenfv, METH_VARARGS, NULL},
+	 { (char *)"glTexGeniv", _wrap_glTexGeniv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexGendv", _wrap_glGetTexGendv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexGenfv", _wrap_glGetTexGenfv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexGeniv", _wrap_glGetTexGeniv, METH_VARARGS, NULL},
+	 { (char *)"glTexEnvf", _wrap_glTexEnvf, METH_VARARGS, NULL},
+	 { (char *)"glTexEnvi", _wrap_glTexEnvi, METH_VARARGS, NULL},
+	 { (char *)"glTexEnvfv", _wrap_glTexEnvfv, METH_VARARGS, NULL},
+	 { (char *)"glTexEnviv", _wrap_glTexEnviv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexEnvfv", _wrap_glGetTexEnvfv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexEnviv", _wrap_glGetTexEnviv, METH_VARARGS, NULL},
+	 { (char *)"glTexParameterf", _wrap_glTexParameterf, METH_VARARGS, NULL},
+	 { (char *)"glTexParameteri", _wrap_glTexParameteri, METH_VARARGS, NULL},
+	 { (char *)"glTexParameterfv", _wrap_glTexParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glTexParameteriv", _wrap_glTexParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexParameterfv", _wrap_glGetTexParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexParameteriv", _wrap_glGetTexParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexLevelParameterfv", _wrap_glGetTexLevelParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetTexLevelParameteriv", _wrap_glGetTexLevelParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glTexImage1D", _wrap_glTexImage1D, METH_VARARGS, NULL},
+	 { (char *)"glTexImage2D", _wrap_glTexImage2D, METH_VARARGS, NULL},
+	 { (char *)"glGetTexImage", _wrap_glGetTexImage, METH_VARARGS, NULL},
+	 { (char *)"glGenTextures", _wrap_glGenTextures, METH_VARARGS, NULL},
+	 { (char *)"glDeleteTextures", _wrap_glDeleteTextures, METH_VARARGS, NULL},
+	 { (char *)"glBindTexture", _wrap_glBindTexture, METH_VARARGS, NULL},
+	 { (char *)"glPrioritizeTextures", _wrap_glPrioritizeTextures, METH_VARARGS, NULL},
+	 { (char *)"glAreTexturesResident", _wrap_glAreTexturesResident, METH_VARARGS, NULL},
+	 { (char *)"glIsTexture", _wrap_glIsTexture, METH_VARARGS, NULL},
+	 { (char *)"glTexSubImage1D", _wrap_glTexSubImage1D, METH_VARARGS, NULL},
+	 { (char *)"glTexSubImage2D", _wrap_glTexSubImage2D, METH_VARARGS, NULL},
+	 { (char *)"glCopyTexImage1D", _wrap_glCopyTexImage1D, METH_VARARGS, NULL},
+	 { (char *)"glCopyTexImage2D", _wrap_glCopyTexImage2D, METH_VARARGS, NULL},
+	 { (char *)"glCopyTexSubImage1D", _wrap_glCopyTexSubImage1D, METH_VARARGS, NULL},
+	 { (char *)"glCopyTexSubImage2D", _wrap_glCopyTexSubImage2D, METH_VARARGS, NULL},
+	 { (char *)"glMap1d", _wrap_glMap1d, METH_VARARGS, NULL},
+	 { (char *)"glMap1f", _wrap_glMap1f, METH_VARARGS, NULL},
+	 { (char *)"glMap2d", _wrap_glMap2d, METH_VARARGS, NULL},
+	 { (char *)"glMap2f", _wrap_glMap2f, METH_VARARGS, NULL},
+	 { (char *)"glGetMapdv", _wrap_glGetMapdv, METH_VARARGS, NULL},
+	 { (char *)"glGetMapfv", _wrap_glGetMapfv, METH_VARARGS, NULL},
+	 { (char *)"glGetMapiv", _wrap_glGetMapiv, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord1d", _wrap_glEvalCoord1d, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord1f", _wrap_glEvalCoord1f, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord1dv", _wrap_glEvalCoord1dv, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord1fv", _wrap_glEvalCoord1fv, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord2d", _wrap_glEvalCoord2d, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord2f", _wrap_glEvalCoord2f, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord2dv", _wrap_glEvalCoord2dv, METH_VARARGS, NULL},
+	 { (char *)"glEvalCoord2fv", _wrap_glEvalCoord2fv, METH_VARARGS, NULL},
+	 { (char *)"glMapGrid1d", _wrap_glMapGrid1d, METH_VARARGS, NULL},
+	 { (char *)"glMapGrid1f", _wrap_glMapGrid1f, METH_VARARGS, NULL},
+	 { (char *)"glMapGrid2d", _wrap_glMapGrid2d, METH_VARARGS, NULL},
+	 { (char *)"glMapGrid2f", _wrap_glMapGrid2f, METH_VARARGS, NULL},
+	 { (char *)"glEvalPoint1", _wrap_glEvalPoint1, METH_VARARGS, NULL},
+	 { (char *)"glEvalPoint2", _wrap_glEvalPoint2, METH_VARARGS, NULL},
+	 { (char *)"glEvalMesh1", _wrap_glEvalMesh1, METH_VARARGS, NULL},
+	 { (char *)"glEvalMesh2", _wrap_glEvalMesh2, METH_VARARGS, NULL},
+	 { (char *)"glFogf", _wrap_glFogf, METH_VARARGS, NULL},
+	 { (char *)"glFogi", _wrap_glFogi, METH_VARARGS, NULL},
+	 { (char *)"glFogfv", _wrap_glFogfv, METH_VARARGS, NULL},
+	 { (char *)"glFogiv", _wrap_glFogiv, METH_VARARGS, NULL},
+	 { (char *)"glFeedbackBuffer", _wrap_glFeedbackBuffer, METH_VARARGS, NULL},
+	 { (char *)"glPassThrough", _wrap_glPassThrough, METH_VARARGS, NULL},
+	 { (char *)"glSelectBuffer", _wrap_glSelectBuffer, METH_VARARGS, NULL},
+	 { (char *)"glInitNames", _wrap_glInitNames, METH_VARARGS, NULL},
+	 { (char *)"glLoadName", _wrap_glLoadName, METH_VARARGS, NULL},
+	 { (char *)"glPushName", _wrap_glPushName, METH_VARARGS, NULL},
+	 { (char *)"glPopName", _wrap_glPopName, METH_VARARGS, NULL},
+	 { (char *)"glDrawRangeElements", _wrap_glDrawRangeElements, METH_VARARGS, NULL},
+	 { (char *)"glTexImage3D", _wrap_glTexImage3D, METH_VARARGS, NULL},
+	 { (char *)"glTexSubImage3D", _wrap_glTexSubImage3D, METH_VARARGS, NULL},
+	 { (char *)"glCopyTexSubImage3D", _wrap_glCopyTexSubImage3D, METH_VARARGS, NULL},
+	 { (char *)"glColorTable", _wrap_glColorTable, METH_VARARGS, NULL},
+	 { (char *)"glColorSubTable", _wrap_glColorSubTable, METH_VARARGS, NULL},
+	 { (char *)"glColorTableParameteriv", _wrap_glColorTableParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glColorTableParameterfv", _wrap_glColorTableParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glCopyColorSubTable", _wrap_glCopyColorSubTable, METH_VARARGS, NULL},
+	 { (char *)"glCopyColorTable", _wrap_glCopyColorTable, METH_VARARGS, NULL},
+	 { (char *)"glGetColorTable", _wrap_glGetColorTable, METH_VARARGS, NULL},
+	 { (char *)"glGetColorTableParameterfv", _wrap_glGetColorTableParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetColorTableParameteriv", _wrap_glGetColorTableParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glBlendEquation", _wrap_glBlendEquation, METH_VARARGS, NULL},
+	 { (char *)"glBlendColor", _wrap_glBlendColor, METH_VARARGS, NULL},
+	 { (char *)"glHistogram", _wrap_glHistogram, METH_VARARGS, NULL},
+	 { (char *)"glResetHistogram", _wrap_glResetHistogram, METH_VARARGS, NULL},
+	 { (char *)"glGetHistogram", _wrap_glGetHistogram, METH_VARARGS, NULL},
+	 { (char *)"glGetHistogramParameterfv", _wrap_glGetHistogramParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetHistogramParameteriv", _wrap_glGetHistogramParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glMinmax", _wrap_glMinmax, METH_VARARGS, NULL},
+	 { (char *)"glResetMinmax", _wrap_glResetMinmax, METH_VARARGS, NULL},
+	 { (char *)"glGetMinmax", _wrap_glGetMinmax, METH_VARARGS, NULL},
+	 { (char *)"glGetMinmaxParameterfv", _wrap_glGetMinmaxParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetMinmaxParameteriv", _wrap_glGetMinmaxParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionFilter1D", _wrap_glConvolutionFilter1D, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionFilter2D", _wrap_glConvolutionFilter2D, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionParameterf", _wrap_glConvolutionParameterf, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionParameterfv", _wrap_glConvolutionParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionParameteri", _wrap_glConvolutionParameteri, METH_VARARGS, NULL},
+	 { (char *)"glConvolutionParameteriv", _wrap_glConvolutionParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glCopyConvolutionFilter1D", _wrap_glCopyConvolutionFilter1D, METH_VARARGS, NULL},
+	 { (char *)"glCopyConvolutionFilter2D", _wrap_glCopyConvolutionFilter2D, METH_VARARGS, NULL},
+	 { (char *)"glGetConvolutionFilter", _wrap_glGetConvolutionFilter, METH_VARARGS, NULL},
+	 { (char *)"glGetConvolutionParameterfv", _wrap_glGetConvolutionParameterfv, METH_VARARGS, NULL},
+	 { (char *)"glGetConvolutionParameteriv", _wrap_glGetConvolutionParameteriv, METH_VARARGS, NULL},
+	 { (char *)"glSeparableFilter2D", _wrap_glSeparableFilter2D, METH_VARARGS, NULL},
+	 { (char *)"glGetSeparableFilter", _wrap_glGetSeparableFilter, METH_VARARGS, NULL},
+	 { (char *)"glActiveTexture", _wrap_glActiveTexture, METH_VARARGS, NULL},
+	 { (char *)"glClientActiveTexture", _wrap_glClientActiveTexture, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexImage1D", _wrap_glCompressedTexImage1D, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexImage2D", _wrap_glCompressedTexImage2D, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexImage3D", _wrap_glCompressedTexImage3D, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexSubImage1D", _wrap_glCompressedTexSubImage1D, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexSubImage2D", _wrap_glCompressedTexSubImage2D, METH_VARARGS, NULL},
+	 { (char *)"glCompressedTexSubImage3D", _wrap_glCompressedTexSubImage3D, METH_VARARGS, NULL},
+	 { (char *)"glGetCompressedTexImage", _wrap_glGetCompressedTexImage, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1d", _wrap_glMultiTexCoord1d, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1dv", _wrap_glMultiTexCoord1dv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1f", _wrap_glMultiTexCoord1f, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1fv", _wrap_glMultiTexCoord1fv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1i", _wrap_glMultiTexCoord1i, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1iv", _wrap_glMultiTexCoord1iv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1s", _wrap_glMultiTexCoord1s, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1sv", _wrap_glMultiTexCoord1sv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2d", _wrap_glMultiTexCoord2d, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2dv", _wrap_glMultiTexCoord2dv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2f", _wrap_glMultiTexCoord2f, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2fv", _wrap_glMultiTexCoord2fv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2i", _wrap_glMultiTexCoord2i, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2iv", _wrap_glMultiTexCoord2iv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2s", _wrap_glMultiTexCoord2s, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2sv", _wrap_glMultiTexCoord2sv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3d", _wrap_glMultiTexCoord3d, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3dv", _wrap_glMultiTexCoord3dv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3f", _wrap_glMultiTexCoord3f, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3fv", _wrap_glMultiTexCoord3fv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3i", _wrap_glMultiTexCoord3i, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3iv", _wrap_glMultiTexCoord3iv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3s", _wrap_glMultiTexCoord3s, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3sv", _wrap_glMultiTexCoord3sv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4d", _wrap_glMultiTexCoord4d, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4dv", _wrap_glMultiTexCoord4dv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4f", _wrap_glMultiTexCoord4f, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4fv", _wrap_glMultiTexCoord4fv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4i", _wrap_glMultiTexCoord4i, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4iv", _wrap_glMultiTexCoord4iv, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4s", _wrap_glMultiTexCoord4s, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4sv", _wrap_glMultiTexCoord4sv, METH_VARARGS, NULL},
+	 { (char *)"glLoadTransposeMatrixd", _wrap_glLoadTransposeMatrixd, METH_VARARGS, NULL},
+	 { (char *)"glLoadTransposeMatrixf", _wrap_glLoadTransposeMatrixf, METH_VARARGS, NULL},
+	 { (char *)"glMultTransposeMatrixd", _wrap_glMultTransposeMatrixd, METH_VARARGS, NULL},
+	 { (char *)"glMultTransposeMatrixf", _wrap_glMultTransposeMatrixf, METH_VARARGS, NULL},
+	 { (char *)"glSampleCoverage", _wrap_glSampleCoverage, METH_VARARGS, NULL},
+	 { (char *)"glActiveTextureARB", _wrap_glActiveTextureARB, METH_VARARGS, NULL},
+	 { (char *)"glClientActiveTextureARB", _wrap_glClientActiveTextureARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1dARB", _wrap_glMultiTexCoord1dARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1dvARB", _wrap_glMultiTexCoord1dvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1fARB", _wrap_glMultiTexCoord1fARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1fvARB", _wrap_glMultiTexCoord1fvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1iARB", _wrap_glMultiTexCoord1iARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1ivARB", _wrap_glMultiTexCoord1ivARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1sARB", _wrap_glMultiTexCoord1sARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord1svARB", _wrap_glMultiTexCoord1svARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2dARB", _wrap_glMultiTexCoord2dARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2dvARB", _wrap_glMultiTexCoord2dvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2fARB", _wrap_glMultiTexCoord2fARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2fvARB", _wrap_glMultiTexCoord2fvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2iARB", _wrap_glMultiTexCoord2iARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2ivARB", _wrap_glMultiTexCoord2ivARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2sARB", _wrap_glMultiTexCoord2sARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord2svARB", _wrap_glMultiTexCoord2svARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3dARB", _wrap_glMultiTexCoord3dARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3dvARB", _wrap_glMultiTexCoord3dvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3fARB", _wrap_glMultiTexCoord3fARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3fvARB", _wrap_glMultiTexCoord3fvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3iARB", _wrap_glMultiTexCoord3iARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3ivARB", _wrap_glMultiTexCoord3ivARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3sARB", _wrap_glMultiTexCoord3sARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord3svARB", _wrap_glMultiTexCoord3svARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4dARB", _wrap_glMultiTexCoord4dARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4dvARB", _wrap_glMultiTexCoord4dvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4fARB", _wrap_glMultiTexCoord4fARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4fvARB", _wrap_glMultiTexCoord4fvARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4iARB", _wrap_glMultiTexCoord4iARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4ivARB", _wrap_glMultiTexCoord4ivARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4sARB", _wrap_glMultiTexCoord4sARB, METH_VARARGS, NULL},
+	 { (char *)"glMultiTexCoord4svARB", _wrap_glMultiTexCoord4svARB, METH_VARARGS, NULL},
+	 { (char *)"glBlendEquationSeparateATI", _wrap_glBlendEquationSeparateATI, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_double = {"_p_double", "double *|GLclampd *|GLdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_float = {"_p_float", "GLclampf *|float *|GLfloat *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "GLsizei *|int *|GLint *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **|GLvoid **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_short = {"_p_short", "short *|GLshort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|GLbyte *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|GLubyte *|GLboolean *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|GLuint *|GLenum *|GLbitfield *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|GLushort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_void = {"_p_void", "void *|GLvoid *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_char,
+  &_swigt__p_double,
+  &_swigt__p_float,
+  &_swigt__p_int,
+  &_swigt__p_p_void,
+  &_swigt__p_short,
+  &_swigt__p_signed_char,
+  &_swigt__p_unsigned_char,
+  &_swigt__p_unsigned_int,
+  &_swigt__p_unsigned_short,
+  &_swigt__p_void,
+};
+
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_char,
+  _swigc__p_double,
+  _swigc__p_float,
+  _swigc__p_int,
+  _swigc__p_p_void,
+  _swigc__p_short,
+  _swigc__p_signed_char,
+  _swigc__p_unsigned_char,
+  _swigc__p_unsigned_int,
+  _swigc__p_unsigned_short,
+  _swigc__p_void,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+    return PyString_FromString("<Swig global variables>");
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar  *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", PyString_AsString(str));
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;  
+    if (!type_init) {
+      const PyTypeObject tmp
+      = {
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* Number of items in variable part (ob_size) */
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc)swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      varlink_type.ob_type = &PyType_Type;
+      type_init = 1;
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          size_t shift = (ci->ptype) - types;
+          swig_type_info *ty = types_initial[shift];
+          size_t ldoc = (c - methods[i].ml_doc);
+          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+          char *ndoc = (char*)malloc(ldoc + lptr + 10);
+          if (ndoc) {
+            char *buff = ndoc;
+            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+            if (ptr) {
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+SWIGEXPORT void SWIG_init(void) {
+  PyObject *m, *d;
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+  d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  
+  
+  s_opengltk = PypImport_ModuleCobjAttr( "opengltk.extent._utillib",
+    "opengltk_export");
+  if (NOT s_opengltk) return;
+  s_opengltk->checkerror = 1;
+  
+  
+  import_array(); /* load the Numeric PyCObjects */
+  
+  PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"checkArgumentsInCWrapper",Swig_var_checkArgumentsInCWrapper_get, Swig_var_checkArgumentsInCWrapper_set);
+  SWIG_Python_SetConstant(d, "GL_VERSION_1_1",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_VERSION_1_2",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_VERSION_1_3",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_ARB_imaging",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_FALSE",SWIG_From_int((int)(0x0)));
+  SWIG_Python_SetConstant(d, "GL_TRUE",SWIG_From_int((int)(0x1)));
+  SWIG_Python_SetConstant(d, "GL_BYTE",SWIG_From_int((int)(0x1400)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_BYTE",SWIG_From_int((int)(0x1401)));
+  SWIG_Python_SetConstant(d, "GL_SHORT",SWIG_From_int((int)(0x1402)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT",SWIG_From_int((int)(0x1403)));
+  SWIG_Python_SetConstant(d, "GL_INT",SWIG_From_int((int)(0x1404)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT",SWIG_From_int((int)(0x1405)));
+  SWIG_Python_SetConstant(d, "GL_FLOAT",SWIG_From_int((int)(0x1406)));
+  SWIG_Python_SetConstant(d, "GL_2_BYTES",SWIG_From_int((int)(0x1407)));
+  SWIG_Python_SetConstant(d, "GL_3_BYTES",SWIG_From_int((int)(0x1408)));
+  SWIG_Python_SetConstant(d, "GL_4_BYTES",SWIG_From_int((int)(0x1409)));
+  SWIG_Python_SetConstant(d, "GL_DOUBLE",SWIG_From_int((int)(0x140A)));
+  SWIG_Python_SetConstant(d, "GL_POINTS",SWIG_From_int((int)(0x0000)));
+  SWIG_Python_SetConstant(d, "GL_LINES",SWIG_From_int((int)(0x0001)));
+  SWIG_Python_SetConstant(d, "GL_LINE_LOOP",SWIG_From_int((int)(0x0002)));
+  SWIG_Python_SetConstant(d, "GL_LINE_STRIP",SWIG_From_int((int)(0x0003)));
+  SWIG_Python_SetConstant(d, "GL_TRIANGLES",SWIG_From_int((int)(0x0004)));
+  SWIG_Python_SetConstant(d, "GL_TRIANGLE_STRIP",SWIG_From_int((int)(0x0005)));
+  SWIG_Python_SetConstant(d, "GL_TRIANGLE_FAN",SWIG_From_int((int)(0x0006)));
+  SWIG_Python_SetConstant(d, "GL_QUADS",SWIG_From_int((int)(0x0007)));
+  SWIG_Python_SetConstant(d, "GL_QUAD_STRIP",SWIG_From_int((int)(0x0008)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON",SWIG_From_int((int)(0x0009)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_ARRAY",SWIG_From_int((int)(0x8074)));
+  SWIG_Python_SetConstant(d, "GL_NORMAL_ARRAY",SWIG_From_int((int)(0x8075)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_ARRAY",SWIG_From_int((int)(0x8076)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_ARRAY",SWIG_From_int((int)(0x8077)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COORD_ARRAY",SWIG_From_int((int)(0x8078)));
+  SWIG_Python_SetConstant(d, "GL_EDGE_FLAG_ARRAY",SWIG_From_int((int)(0x8079)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_ARRAY_SIZE",SWIG_From_int((int)(0x807A)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_ARRAY_TYPE",SWIG_From_int((int)(0x807B)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_ARRAY_STRIDE",SWIG_From_int((int)(0x807C)));
+  SWIG_Python_SetConstant(d, "GL_NORMAL_ARRAY_TYPE",SWIG_From_int((int)(0x807E)));
+  SWIG_Python_SetConstant(d, "GL_NORMAL_ARRAY_STRIDE",SWIG_From_int((int)(0x807F)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_ARRAY_SIZE",SWIG_From_int((int)(0x8081)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_ARRAY_TYPE",SWIG_From_int((int)(0x8082)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_ARRAY_STRIDE",SWIG_From_int((int)(0x8083)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_ARRAY_TYPE",SWIG_From_int((int)(0x8085)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_ARRAY_STRIDE",SWIG_From_int((int)(0x8086)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COORD_ARRAY_SIZE",SWIG_From_int((int)(0x8088)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COORD_ARRAY_TYPE",SWIG_From_int((int)(0x8089)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COORD_ARRAY_STRIDE",SWIG_From_int((int)(0x808A)));
+  SWIG_Python_SetConstant(d, "GL_EDGE_FLAG_ARRAY_STRIDE",SWIG_From_int((int)(0x808C)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_ARRAY_POINTER",SWIG_From_int((int)(0x808E)));
+  SWIG_Python_SetConstant(d, "GL_NORMAL_ARRAY_POINTER",SWIG_From_int((int)(0x808F)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_ARRAY_POINTER",SWIG_From_int((int)(0x8090)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_ARRAY_POINTER",SWIG_From_int((int)(0x8091)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COORD_ARRAY_POINTER",SWIG_From_int((int)(0x8092)));
+  SWIG_Python_SetConstant(d, "GL_EDGE_FLAG_ARRAY_POINTER",SWIG_From_int((int)(0x8093)));
+  SWIG_Python_SetConstant(d, "GL_V2F",SWIG_From_int((int)(0x2A20)));
+  SWIG_Python_SetConstant(d, "GL_V3F",SWIG_From_int((int)(0x2A21)));
+  SWIG_Python_SetConstant(d, "GL_C4UB_V2F",SWIG_From_int((int)(0x2A22)));
+  SWIG_Python_SetConstant(d, "GL_C4UB_V3F",SWIG_From_int((int)(0x2A23)));
+  SWIG_Python_SetConstant(d, "GL_C3F_V3F",SWIG_From_int((int)(0x2A24)));
+  SWIG_Python_SetConstant(d, "GL_N3F_V3F",SWIG_From_int((int)(0x2A25)));
+  SWIG_Python_SetConstant(d, "GL_C4F_N3F_V3F",SWIG_From_int((int)(0x2A26)));
+  SWIG_Python_SetConstant(d, "GL_T2F_V3F",SWIG_From_int((int)(0x2A27)));
+  SWIG_Python_SetConstant(d, "GL_T4F_V4F",SWIG_From_int((int)(0x2A28)));
+  SWIG_Python_SetConstant(d, "GL_T2F_C4UB_V3F",SWIG_From_int((int)(0x2A29)));
+  SWIG_Python_SetConstant(d, "GL_T2F_C3F_V3F",SWIG_From_int((int)(0x2A2A)));
+  SWIG_Python_SetConstant(d, "GL_T2F_N3F_V3F",SWIG_From_int((int)(0x2A2B)));
+  SWIG_Python_SetConstant(d, "GL_T2F_C4F_N3F_V3F",SWIG_From_int((int)(0x2A2C)));
+  SWIG_Python_SetConstant(d, "GL_T4F_C4F_N3F_V4F",SWIG_From_int((int)(0x2A2D)));
+  SWIG_Python_SetConstant(d, "GL_MATRIX_MODE",SWIG_From_int((int)(0x0BA0)));
+  SWIG_Python_SetConstant(d, "GL_MODELVIEW",SWIG_From_int((int)(0x1700)));
+  SWIG_Python_SetConstant(d, "GL_PROJECTION",SWIG_From_int((int)(0x1701)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE",SWIG_From_int((int)(0x1702)));
+  SWIG_Python_SetConstant(d, "GL_POINT_SMOOTH",SWIG_From_int((int)(0x0B10)));
+  SWIG_Python_SetConstant(d, "GL_POINT_SIZE",SWIG_From_int((int)(0x0B11)));
+  SWIG_Python_SetConstant(d, "GL_POINT_SIZE_GRANULARITY",SWIG_From_int((int)(0x0B13)));
+  SWIG_Python_SetConstant(d, "GL_POINT_SIZE_RANGE",SWIG_From_int((int)(0x0B12)));
+  SWIG_Python_SetConstant(d, "GL_LINE_SMOOTH",SWIG_From_int((int)(0x0B20)));
+  SWIG_Python_SetConstant(d, "GL_LINE_STIPPLE",SWIG_From_int((int)(0x0B24)));
+  SWIG_Python_SetConstant(d, "GL_LINE_STIPPLE_PATTERN",SWIG_From_int((int)(0x0B25)));
+  SWIG_Python_SetConstant(d, "GL_LINE_STIPPLE_REPEAT",SWIG_From_int((int)(0x0B26)));
+  SWIG_Python_SetConstant(d, "GL_LINE_WIDTH",SWIG_From_int((int)(0x0B21)));
+  SWIG_Python_SetConstant(d, "GL_LINE_WIDTH_GRANULARITY",SWIG_From_int((int)(0x0B23)));
+  SWIG_Python_SetConstant(d, "GL_LINE_WIDTH_RANGE",SWIG_From_int((int)(0x0B22)));
+  SWIG_Python_SetConstant(d, "GL_POINT",SWIG_From_int((int)(0x1B00)));
+  SWIG_Python_SetConstant(d, "GL_LINE",SWIG_From_int((int)(0x1B01)));
+  SWIG_Python_SetConstant(d, "GL_FILL",SWIG_From_int((int)(0x1B02)));
+  SWIG_Python_SetConstant(d, "GL_CW",SWIG_From_int((int)(0x0900)));
+  SWIG_Python_SetConstant(d, "GL_CCW",SWIG_From_int((int)(0x0901)));
+  SWIG_Python_SetConstant(d, "GL_FRONT",SWIG_From_int((int)(0x0404)));
+  SWIG_Python_SetConstant(d, "GL_BACK",SWIG_From_int((int)(0x0405)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_MODE",SWIG_From_int((int)(0x0B40)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_SMOOTH",SWIG_From_int((int)(0x0B41)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_STIPPLE",SWIG_From_int((int)(0x0B42)));
+  SWIG_Python_SetConstant(d, "GL_EDGE_FLAG",SWIG_From_int((int)(0x0B43)));
+  SWIG_Python_SetConstant(d, "GL_CULL_FACE",SWIG_From_int((int)(0x0B44)));
+  SWIG_Python_SetConstant(d, "GL_CULL_FACE_MODE",SWIG_From_int((int)(0x0B45)));
+  SWIG_Python_SetConstant(d, "GL_FRONT_FACE",SWIG_From_int((int)(0x0B46)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_OFFSET_FACTOR",SWIG_From_int((int)(0x8038)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_OFFSET_UNITS",SWIG_From_int((int)(0x2A00)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_OFFSET_POINT",SWIG_From_int((int)(0x2A01)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_OFFSET_LINE",SWIG_From_int((int)(0x2A02)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_OFFSET_FILL",SWIG_From_int((int)(0x8037)));
+  SWIG_Python_SetConstant(d, "GL_COMPILE",SWIG_From_int((int)(0x1300)));
+  SWIG_Python_SetConstant(d, "GL_COMPILE_AND_EXECUTE",SWIG_From_int((int)(0x1301)));
+  SWIG_Python_SetConstant(d, "GL_LIST_BASE",SWIG_From_int((int)(0x0B32)));
+  SWIG_Python_SetConstant(d, "GL_LIST_INDEX",SWIG_From_int((int)(0x0B33)));
+  SWIG_Python_SetConstant(d, "GL_LIST_MODE",SWIG_From_int((int)(0x0B30)));
+  SWIG_Python_SetConstant(d, "GL_NEVER",SWIG_From_int((int)(0x0200)));
+  SWIG_Python_SetConstant(d, "GL_LESS",SWIG_From_int((int)(0x0201)));
+  SWIG_Python_SetConstant(d, "GL_EQUAL",SWIG_From_int((int)(0x0202)));
+  SWIG_Python_SetConstant(d, "GL_LEQUAL",SWIG_From_int((int)(0x0203)));
+  SWIG_Python_SetConstant(d, "GL_GREATER",SWIG_From_int((int)(0x0204)));
+  SWIG_Python_SetConstant(d, "GL_NOTEQUAL",SWIG_From_int((int)(0x0205)));
+  SWIG_Python_SetConstant(d, "GL_GEQUAL",SWIG_From_int((int)(0x0206)));
+  SWIG_Python_SetConstant(d, "GL_ALWAYS",SWIG_From_int((int)(0x0207)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_TEST",SWIG_From_int((int)(0x0B71)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_BITS",SWIG_From_int((int)(0x0D56)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_CLEAR_VALUE",SWIG_From_int((int)(0x0B73)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_FUNC",SWIG_From_int((int)(0x0B74)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_RANGE",SWIG_From_int((int)(0x0B70)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_WRITEMASK",SWIG_From_int((int)(0x0B72)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_COMPONENT",SWIG_From_int((int)(0x1902)));
+  SWIG_Python_SetConstant(d, "GL_LIGHTING",SWIG_From_int((int)(0x0B50)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT0",SWIG_From_int((int)(0x4000)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT1",SWIG_From_int((int)(0x4001)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT2",SWIG_From_int((int)(0x4002)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT3",SWIG_From_int((int)(0x4003)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT4",SWIG_From_int((int)(0x4004)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT5",SWIG_From_int((int)(0x4005)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT6",SWIG_From_int((int)(0x4006)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT7",SWIG_From_int((int)(0x4007)));
+  SWIG_Python_SetConstant(d, "GL_SPOT_EXPONENT",SWIG_From_int((int)(0x1205)));
+  SWIG_Python_SetConstant(d, "GL_SPOT_CUTOFF",SWIG_From_int((int)(0x1206)));
+  SWIG_Python_SetConstant(d, "GL_CONSTANT_ATTENUATION",SWIG_From_int((int)(0x1207)));
+  SWIG_Python_SetConstant(d, "GL_LINEAR_ATTENUATION",SWIG_From_int((int)(0x1208)));
+  SWIG_Python_SetConstant(d, "GL_QUADRATIC_ATTENUATION",SWIG_From_int((int)(0x1209)));
+  SWIG_Python_SetConstant(d, "GL_AMBIENT",SWIG_From_int((int)(0x1200)));
+  SWIG_Python_SetConstant(d, "GL_DIFFUSE",SWIG_From_int((int)(0x1201)));
+  SWIG_Python_SetConstant(d, "GL_SPECULAR",SWIG_From_int((int)(0x1202)));
+  SWIG_Python_SetConstant(d, "GL_SHININESS",SWIG_From_int((int)(0x1601)));
+  SWIG_Python_SetConstant(d, "GL_EMISSION",SWIG_From_int((int)(0x1600)));
+  SWIG_Python_SetConstant(d, "GL_POSITION",SWIG_From_int((int)(0x1203)));
+  SWIG_Python_SetConstant(d, "GL_SPOT_DIRECTION",SWIG_From_int((int)(0x1204)));
+  SWIG_Python_SetConstant(d, "GL_AMBIENT_AND_DIFFUSE",SWIG_From_int((int)(0x1602)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_INDEXES",SWIG_From_int((int)(0x1603)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT_MODEL_TWO_SIDE",SWIG_From_int((int)(0x0B52)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT_MODEL_LOCAL_VIEWER",SWIG_From_int((int)(0x0B51)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT_MODEL_AMBIENT",SWIG_From_int((int)(0x0B53)));
+  SWIG_Python_SetConstant(d, "GL_FRONT_AND_BACK",SWIG_From_int((int)(0x0408)));
+  SWIG_Python_SetConstant(d, "GL_SHADE_MODEL",SWIG_From_int((int)(0x0B54)));
+  SWIG_Python_SetConstant(d, "GL_FLAT",SWIG_From_int((int)(0x1D00)));
+  SWIG_Python_SetConstant(d, "GL_SMOOTH",SWIG_From_int((int)(0x1D01)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_MATERIAL",SWIG_From_int((int)(0x0B57)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_MATERIAL_FACE",SWIG_From_int((int)(0x0B55)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_MATERIAL_PARAMETER",SWIG_From_int((int)(0x0B56)));
+  SWIG_Python_SetConstant(d, "GL_NORMALIZE",SWIG_From_int((int)(0x0BA1)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE0",SWIG_From_int((int)(0x3000)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE1",SWIG_From_int((int)(0x3001)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE2",SWIG_From_int((int)(0x3002)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE3",SWIG_From_int((int)(0x3003)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE4",SWIG_From_int((int)(0x3004)));
+  SWIG_Python_SetConstant(d, "GL_CLIP_PLANE5",SWIG_From_int((int)(0x3005)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_RED_BITS",SWIG_From_int((int)(0x0D58)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_GREEN_BITS",SWIG_From_int((int)(0x0D59)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_BLUE_BITS",SWIG_From_int((int)(0x0D5A)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_ALPHA_BITS",SWIG_From_int((int)(0x0D5B)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_CLEAR_VALUE",SWIG_From_int((int)(0x0B80)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM",SWIG_From_int((int)(0x0100)));
+  SWIG_Python_SetConstant(d, "GL_ADD",SWIG_From_int((int)(0x0104)));
+  SWIG_Python_SetConstant(d, "GL_LOAD",SWIG_From_int((int)(0x0101)));
+  SWIG_Python_SetConstant(d, "GL_MULT",SWIG_From_int((int)(0x0103)));
+  SWIG_Python_SetConstant(d, "GL_RETURN",SWIG_From_int((int)(0x0102)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_TEST",SWIG_From_int((int)(0x0BC0)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_TEST_REF",SWIG_From_int((int)(0x0BC2)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_TEST_FUNC",SWIG_From_int((int)(0x0BC1)));
+  SWIG_Python_SetConstant(d, "GL_BLEND",SWIG_From_int((int)(0x0BE2)));
+  SWIG_Python_SetConstant(d, "GL_BLEND_SRC",SWIG_From_int((int)(0x0BE1)));
+  SWIG_Python_SetConstant(d, "GL_BLEND_DST",SWIG_From_int((int)(0x0BE0)));
+  SWIG_Python_SetConstant(d, "GL_ZERO",SWIG_From_int((int)(0x0)));
+  SWIG_Python_SetConstant(d, "GL_ONE",SWIG_From_int((int)(0x1)));
+  SWIG_Python_SetConstant(d, "GL_SRC_COLOR",SWIG_From_int((int)(0x0300)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_SRC_COLOR",SWIG_From_int((int)(0x0301)));
+  SWIG_Python_SetConstant(d, "GL_SRC_ALPHA",SWIG_From_int((int)(0x0302)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_SRC_ALPHA",SWIG_From_int((int)(0x0303)));
+  SWIG_Python_SetConstant(d, "GL_DST_ALPHA",SWIG_From_int((int)(0x0304)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_DST_ALPHA",SWIG_From_int((int)(0x0305)));
+  SWIG_Python_SetConstant(d, "GL_DST_COLOR",SWIG_From_int((int)(0x0306)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_DST_COLOR",SWIG_From_int((int)(0x0307)));
+  SWIG_Python_SetConstant(d, "GL_SRC_ALPHA_SATURATE",SWIG_From_int((int)(0x0308)));
+  SWIG_Python_SetConstant(d, "GL_FEEDBACK",SWIG_From_int((int)(0x1C01)));
+  SWIG_Python_SetConstant(d, "GL_RENDER",SWIG_From_int((int)(0x1C00)));
+  SWIG_Python_SetConstant(d, "GL_SELECT",SWIG_From_int((int)(0x1C02)));
+  SWIG_Python_SetConstant(d, "GL_2D",SWIG_From_int((int)(0x0600)));
+  SWIG_Python_SetConstant(d, "GL_3D",SWIG_From_int((int)(0x0601)));
+  SWIG_Python_SetConstant(d, "GL_3D_COLOR",SWIG_From_int((int)(0x0602)));
+  SWIG_Python_SetConstant(d, "GL_3D_COLOR_TEXTURE",SWIG_From_int((int)(0x0603)));
+  SWIG_Python_SetConstant(d, "GL_4D_COLOR_TEXTURE",SWIG_From_int((int)(0x0604)));
+  SWIG_Python_SetConstant(d, "GL_POINT_TOKEN",SWIG_From_int((int)(0x0701)));
+  SWIG_Python_SetConstant(d, "GL_LINE_TOKEN",SWIG_From_int((int)(0x0702)));
+  SWIG_Python_SetConstant(d, "GL_LINE_RESET_TOKEN",SWIG_From_int((int)(0x0707)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_TOKEN",SWIG_From_int((int)(0x0703)));
+  SWIG_Python_SetConstant(d, "GL_BITMAP_TOKEN",SWIG_From_int((int)(0x0704)));
+  SWIG_Python_SetConstant(d, "GL_DRAW_PIXEL_TOKEN",SWIG_From_int((int)(0x0705)));
+  SWIG_Python_SetConstant(d, "GL_COPY_PIXEL_TOKEN",SWIG_From_int((int)(0x0706)));
+  SWIG_Python_SetConstant(d, "GL_PASS_THROUGH_TOKEN",SWIG_From_int((int)(0x0700)));
+  SWIG_Python_SetConstant(d, "GL_FEEDBACK_BUFFER_POINTER",SWIG_From_int((int)(0x0DF0)));
+  SWIG_Python_SetConstant(d, "GL_FEEDBACK_BUFFER_SIZE",SWIG_From_int((int)(0x0DF1)));
+  SWIG_Python_SetConstant(d, "GL_FEEDBACK_BUFFER_TYPE",SWIG_From_int((int)(0x0DF2)));
+  SWIG_Python_SetConstant(d, "GL_SELECTION_BUFFER_POINTER",SWIG_From_int((int)(0x0DF3)));
+  SWIG_Python_SetConstant(d, "GL_SELECTION_BUFFER_SIZE",SWIG_From_int((int)(0x0DF4)));
+  SWIG_Python_SetConstant(d, "GL_FOG",SWIG_From_int((int)(0x0B60)));
+  SWIG_Python_SetConstant(d, "GL_FOG_MODE",SWIG_From_int((int)(0x0B65)));
+  SWIG_Python_SetConstant(d, "GL_FOG_DENSITY",SWIG_From_int((int)(0x0B62)));
+  SWIG_Python_SetConstant(d, "GL_FOG_COLOR",SWIG_From_int((int)(0x0B66)));
+  SWIG_Python_SetConstant(d, "GL_FOG_INDEX",SWIG_From_int((int)(0x0B61)));
+  SWIG_Python_SetConstant(d, "GL_FOG_START",SWIG_From_int((int)(0x0B63)));
+  SWIG_Python_SetConstant(d, "GL_FOG_END",SWIG_From_int((int)(0x0B64)));
+  SWIG_Python_SetConstant(d, "GL_LINEAR",SWIG_From_int((int)(0x2601)));
+  SWIG_Python_SetConstant(d, "GL_EXP",SWIG_From_int((int)(0x0800)));
+  SWIG_Python_SetConstant(d, "GL_EXP2",SWIG_From_int((int)(0x0801)));
+  SWIG_Python_SetConstant(d, "GL_LOGIC_OP",SWIG_From_int((int)(0x0BF1)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_LOGIC_OP",SWIG_From_int((int)(0x0BF1)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_LOGIC_OP",SWIG_From_int((int)(0x0BF2)));
+  SWIG_Python_SetConstant(d, "GL_LOGIC_OP_MODE",SWIG_From_int((int)(0x0BF0)));
+  SWIG_Python_SetConstant(d, "GL_CLEAR",SWIG_From_int((int)(0x1500)));
+  SWIG_Python_SetConstant(d, "GL_SET",SWIG_From_int((int)(0x150F)));
+  SWIG_Python_SetConstant(d, "GL_COPY",SWIG_From_int((int)(0x1503)));
+  SWIG_Python_SetConstant(d, "GL_COPY_INVERTED",SWIG_From_int((int)(0x150C)));
+  SWIG_Python_SetConstant(d, "GL_NOOP",SWIG_From_int((int)(0x1505)));
+  SWIG_Python_SetConstant(d, "GL_INVERT",SWIG_From_int((int)(0x150A)));
+  SWIG_Python_SetConstant(d, "GL_AND",SWIG_From_int((int)(0x1501)));
+  SWIG_Python_SetConstant(d, "GL_NAND",SWIG_From_int((int)(0x150E)));
+  SWIG_Python_SetConstant(d, "GL_OR",SWIG_From_int((int)(0x1507)));
+  SWIG_Python_SetConstant(d, "GL_NOR",SWIG_From_int((int)(0x1508)));
+  SWIG_Python_SetConstant(d, "GL_XOR",SWIG_From_int((int)(0x1506)));
+  SWIG_Python_SetConstant(d, "GL_EQUIV",SWIG_From_int((int)(0x1509)));
+  SWIG_Python_SetConstant(d, "GL_AND_REVERSE",SWIG_From_int((int)(0x1502)));
+  SWIG_Python_SetConstant(d, "GL_AND_INVERTED",SWIG_From_int((int)(0x1504)));
+  SWIG_Python_SetConstant(d, "GL_OR_REVERSE",SWIG_From_int((int)(0x150B)));
+  SWIG_Python_SetConstant(d, "GL_OR_INVERTED",SWIG_From_int((int)(0x150D)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_BITS",SWIG_From_int((int)(0x0D57)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_TEST",SWIG_From_int((int)(0x0B90)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_CLEAR_VALUE",SWIG_From_int((int)(0x0B91)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_FUNC",SWIG_From_int((int)(0x0B92)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_VALUE_MASK",SWIG_From_int((int)(0x0B93)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_FAIL",SWIG_From_int((int)(0x0B94)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_PASS_DEPTH_FAIL",SWIG_From_int((int)(0x0B95)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_PASS_DEPTH_PASS",SWIG_From_int((int)(0x0B96)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_REF",SWIG_From_int((int)(0x0B97)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_WRITEMASK",SWIG_From_int((int)(0x0B98)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_INDEX",SWIG_From_int((int)(0x1901)));
+  SWIG_Python_SetConstant(d, "GL_KEEP",SWIG_From_int((int)(0x1E00)));
+  SWIG_Python_SetConstant(d, "GL_REPLACE",SWIG_From_int((int)(0x1E01)));
+  SWIG_Python_SetConstant(d, "GL_INCR",SWIG_From_int((int)(0x1E02)));
+  SWIG_Python_SetConstant(d, "GL_DECR",SWIG_From_int((int)(0x1E03)));
+  SWIG_Python_SetConstant(d, "GL_NONE",SWIG_From_int((int)(0x0)));
+  SWIG_Python_SetConstant(d, "GL_LEFT",SWIG_From_int((int)(0x0406)));
+  SWIG_Python_SetConstant(d, "GL_RIGHT",SWIG_From_int((int)(0x0407)));
+  SWIG_Python_SetConstant(d, "GL_FRONT_LEFT",SWIG_From_int((int)(0x0400)));
+  SWIG_Python_SetConstant(d, "GL_FRONT_RIGHT",SWIG_From_int((int)(0x0401)));
+  SWIG_Python_SetConstant(d, "GL_BACK_LEFT",SWIG_From_int((int)(0x0402)));
+  SWIG_Python_SetConstant(d, "GL_BACK_RIGHT",SWIG_From_int((int)(0x0403)));
+  SWIG_Python_SetConstant(d, "GL_AUX0",SWIG_From_int((int)(0x0409)));
+  SWIG_Python_SetConstant(d, "GL_AUX1",SWIG_From_int((int)(0x040A)));
+  SWIG_Python_SetConstant(d, "GL_AUX2",SWIG_From_int((int)(0x040B)));
+  SWIG_Python_SetConstant(d, "GL_AUX3",SWIG_From_int((int)(0x040C)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_INDEX",SWIG_From_int((int)(0x1900)));
+  SWIG_Python_SetConstant(d, "GL_RED",SWIG_From_int((int)(0x1903)));
+  SWIG_Python_SetConstant(d, "GL_GREEN",SWIG_From_int((int)(0x1904)));
+  SWIG_Python_SetConstant(d, "GL_BLUE",SWIG_From_int((int)(0x1905)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA",SWIG_From_int((int)(0x1906)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE",SWIG_From_int((int)(0x1909)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE_ALPHA",SWIG_From_int((int)(0x190A)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_BITS",SWIG_From_int((int)(0x0D55)));
+  SWIG_Python_SetConstant(d, "GL_RED_BITS",SWIG_From_int((int)(0x0D52)));
+  SWIG_Python_SetConstant(d, "GL_GREEN_BITS",SWIG_From_int((int)(0x0D53)));
+  SWIG_Python_SetConstant(d, "GL_BLUE_BITS",SWIG_From_int((int)(0x0D54)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_BITS",SWIG_From_int((int)(0x0D51)));
+  SWIG_Python_SetConstant(d, "GL_SUBPIXEL_BITS",SWIG_From_int((int)(0x0D50)));
+  SWIG_Python_SetConstant(d, "GL_AUX_BUFFERS",SWIG_From_int((int)(0x0C00)));
+  SWIG_Python_SetConstant(d, "GL_READ_BUFFER",SWIG_From_int((int)(0x0C02)));
+  SWIG_Python_SetConstant(d, "GL_DRAW_BUFFER",SWIG_From_int((int)(0x0C01)));
+  SWIG_Python_SetConstant(d, "GL_DOUBLEBUFFER",SWIG_From_int((int)(0x0C32)));
+  SWIG_Python_SetConstant(d, "GL_STEREO",SWIG_From_int((int)(0x0C33)));
+  SWIG_Python_SetConstant(d, "GL_BITMAP",SWIG_From_int((int)(0x1A00)));
+  SWIG_Python_SetConstant(d, "GL_COLOR",SWIG_From_int((int)(0x1800)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH",SWIG_From_int((int)(0x1801)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL",SWIG_From_int((int)(0x1802)));
+  SWIG_Python_SetConstant(d, "GL_DITHER",SWIG_From_int((int)(0x0BD0)));
+  SWIG_Python_SetConstant(d, "GL_RGB",SWIG_From_int((int)(0x1907)));
+  SWIG_Python_SetConstant(d, "GL_RGBA",SWIG_From_int((int)(0x1908)));
+  SWIG_Python_SetConstant(d, "GL_MAX_LIST_NESTING",SWIG_From_int((int)(0x0B31)));
+  SWIG_Python_SetConstant(d, "GL_MAX_EVAL_ORDER",SWIG_From_int((int)(0x0D30)));
+  SWIG_Python_SetConstant(d, "GL_MAX_LIGHTS",SWIG_From_int((int)(0x0D31)));
+  SWIG_Python_SetConstant(d, "GL_MAX_CLIP_PLANES",SWIG_From_int((int)(0x0D32)));
+  SWIG_Python_SetConstant(d, "GL_MAX_TEXTURE_SIZE",SWIG_From_int((int)(0x0D33)));
+  SWIG_Python_SetConstant(d, "GL_MAX_PIXEL_MAP_TABLE",SWIG_From_int((int)(0x0D34)));
+  SWIG_Python_SetConstant(d, "GL_MAX_ATTRIB_STACK_DEPTH",SWIG_From_int((int)(0x0D35)));
+  SWIG_Python_SetConstant(d, "GL_MAX_MODELVIEW_STACK_DEPTH",SWIG_From_int((int)(0x0D36)));
+  SWIG_Python_SetConstant(d, "GL_MAX_NAME_STACK_DEPTH",SWIG_From_int((int)(0x0D37)));
+  SWIG_Python_SetConstant(d, "GL_MAX_PROJECTION_STACK_DEPTH",SWIG_From_int((int)(0x0D38)));
+  SWIG_Python_SetConstant(d, "GL_MAX_TEXTURE_STACK_DEPTH",SWIG_From_int((int)(0x0D39)));
+  SWIG_Python_SetConstant(d, "GL_MAX_VIEWPORT_DIMS",SWIG_From_int((int)(0x0D3A)));
+  SWIG_Python_SetConstant(d, "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH",SWIG_From_int((int)(0x0D3B)));
+  SWIG_Python_SetConstant(d, "GL_ATTRIB_STACK_DEPTH",SWIG_From_int((int)(0x0BB0)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_ATTRIB_STACK_DEPTH",SWIG_From_int((int)(0x0BB1)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_CLEAR_VALUE",SWIG_From_int((int)(0x0C22)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_WRITEMASK",SWIG_From_int((int)(0x0C23)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_INDEX",SWIG_From_int((int)(0x0B01)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_COLOR",SWIG_From_int((int)(0x0B00)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_NORMAL",SWIG_From_int((int)(0x0B02)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_COLOR",SWIG_From_int((int)(0x0B04)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_DISTANCE",SWIG_From_int((int)(0x0B09)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_INDEX",SWIG_From_int((int)(0x0B05)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_POSITION",SWIG_From_int((int)(0x0B07)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_TEXTURE_COORDS",SWIG_From_int((int)(0x0B06)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_RASTER_POSITION_VALID",SWIG_From_int((int)(0x0B08)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_TEXTURE_COORDS",SWIG_From_int((int)(0x0B03)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_CLEAR_VALUE",SWIG_From_int((int)(0x0C20)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_MODE",SWIG_From_int((int)(0x0C30)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_WRITEMASK",SWIG_From_int((int)(0x0C21)));
+  SWIG_Python_SetConstant(d, "GL_MODELVIEW_MATRIX",SWIG_From_int((int)(0x0BA6)));
+  SWIG_Python_SetConstant(d, "GL_MODELVIEW_STACK_DEPTH",SWIG_From_int((int)(0x0BA3)));
+  SWIG_Python_SetConstant(d, "GL_NAME_STACK_DEPTH",SWIG_From_int((int)(0x0D70)));
+  SWIG_Python_SetConstant(d, "GL_PROJECTION_MATRIX",SWIG_From_int((int)(0x0BA7)));
+  SWIG_Python_SetConstant(d, "GL_PROJECTION_STACK_DEPTH",SWIG_From_int((int)(0x0BA4)));
+  SWIG_Python_SetConstant(d, "GL_RENDER_MODE",SWIG_From_int((int)(0x0C40)));
+  SWIG_Python_SetConstant(d, "GL_RGBA_MODE",SWIG_From_int((int)(0x0C31)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MATRIX",SWIG_From_int((int)(0x0BA8)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_STACK_DEPTH",SWIG_From_int((int)(0x0BA5)));
+  SWIG_Python_SetConstant(d, "GL_VIEWPORT",SWIG_From_int((int)(0x0BA2)));
+  SWIG_Python_SetConstant(d, "GL_AUTO_NORMAL",SWIG_From_int((int)(0x0D80)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_COLOR_4",SWIG_From_int((int)(0x0D90)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_INDEX",SWIG_From_int((int)(0x0D91)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_NORMAL",SWIG_From_int((int)(0x0D92)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_TEXTURE_COORD_1",SWIG_From_int((int)(0x0D93)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_TEXTURE_COORD_2",SWIG_From_int((int)(0x0D94)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_TEXTURE_COORD_3",SWIG_From_int((int)(0x0D95)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_TEXTURE_COORD_4",SWIG_From_int((int)(0x0D96)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_VERTEX_3",SWIG_From_int((int)(0x0D97)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_VERTEX_4",SWIG_From_int((int)(0x0D98)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_COLOR_4",SWIG_From_int((int)(0x0DB0)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_INDEX",SWIG_From_int((int)(0x0DB1)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_NORMAL",SWIG_From_int((int)(0x0DB2)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_TEXTURE_COORD_1",SWIG_From_int((int)(0x0DB3)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_TEXTURE_COORD_2",SWIG_From_int((int)(0x0DB4)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_TEXTURE_COORD_3",SWIG_From_int((int)(0x0DB5)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_TEXTURE_COORD_4",SWIG_From_int((int)(0x0DB6)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_VERTEX_3",SWIG_From_int((int)(0x0DB7)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_VERTEX_4",SWIG_From_int((int)(0x0DB8)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_GRID_DOMAIN",SWIG_From_int((int)(0x0DD0)));
+  SWIG_Python_SetConstant(d, "GL_MAP1_GRID_SEGMENTS",SWIG_From_int((int)(0x0DD1)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_GRID_DOMAIN",SWIG_From_int((int)(0x0DD2)));
+  SWIG_Python_SetConstant(d, "GL_MAP2_GRID_SEGMENTS",SWIG_From_int((int)(0x0DD3)));
+  SWIG_Python_SetConstant(d, "GL_COEFF",SWIG_From_int((int)(0x0A00)));
+  SWIG_Python_SetConstant(d, "GL_ORDER",SWIG_From_int((int)(0x0A01)));
+  SWIG_Python_SetConstant(d, "GL_DOMAIN",SWIG_From_int((int)(0x0A02)));
+  SWIG_Python_SetConstant(d, "GL_PERSPECTIVE_CORRECTION_HINT",SWIG_From_int((int)(0x0C50)));
+  SWIG_Python_SetConstant(d, "GL_POINT_SMOOTH_HINT",SWIG_From_int((int)(0x0C51)));
+  SWIG_Python_SetConstant(d, "GL_LINE_SMOOTH_HINT",SWIG_From_int((int)(0x0C52)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_SMOOTH_HINT",SWIG_From_int((int)(0x0C53)));
+  SWIG_Python_SetConstant(d, "GL_FOG_HINT",SWIG_From_int((int)(0x0C54)));
+  SWIG_Python_SetConstant(d, "GL_DONT_CARE",SWIG_From_int((int)(0x1100)));
+  SWIG_Python_SetConstant(d, "GL_FASTEST",SWIG_From_int((int)(0x1101)));
+  SWIG_Python_SetConstant(d, "GL_NICEST",SWIG_From_int((int)(0x1102)));
+  SWIG_Python_SetConstant(d, "GL_SCISSOR_BOX",SWIG_From_int((int)(0x0C10)));
+  SWIG_Python_SetConstant(d, "GL_SCISSOR_TEST",SWIG_From_int((int)(0x0C11)));
+  SWIG_Python_SetConstant(d, "GL_MAP_COLOR",SWIG_From_int((int)(0x0D10)));
+  SWIG_Python_SetConstant(d, "GL_MAP_STENCIL",SWIG_From_int((int)(0x0D11)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_SHIFT",SWIG_From_int((int)(0x0D12)));
+  SWIG_Python_SetConstant(d, "GL_INDEX_OFFSET",SWIG_From_int((int)(0x0D13)));
+  SWIG_Python_SetConstant(d, "GL_RED_SCALE",SWIG_From_int((int)(0x0D14)));
+  SWIG_Python_SetConstant(d, "GL_RED_BIAS",SWIG_From_int((int)(0x0D15)));
+  SWIG_Python_SetConstant(d, "GL_GREEN_SCALE",SWIG_From_int((int)(0x0D18)));
+  SWIG_Python_SetConstant(d, "GL_GREEN_BIAS",SWIG_From_int((int)(0x0D19)));
+  SWIG_Python_SetConstant(d, "GL_BLUE_SCALE",SWIG_From_int((int)(0x0D1A)));
+  SWIG_Python_SetConstant(d, "GL_BLUE_BIAS",SWIG_From_int((int)(0x0D1B)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_SCALE",SWIG_From_int((int)(0x0D1C)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_BIAS",SWIG_From_int((int)(0x0D1D)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_SCALE",SWIG_From_int((int)(0x0D1E)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_BIAS",SWIG_From_int((int)(0x0D1F)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_S_TO_S_SIZE",SWIG_From_int((int)(0x0CB1)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_I_SIZE",SWIG_From_int((int)(0x0CB0)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_R_SIZE",SWIG_From_int((int)(0x0CB2)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_G_SIZE",SWIG_From_int((int)(0x0CB3)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_B_SIZE",SWIG_From_int((int)(0x0CB4)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_A_SIZE",SWIG_From_int((int)(0x0CB5)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_R_TO_R_SIZE",SWIG_From_int((int)(0x0CB6)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_G_TO_G_SIZE",SWIG_From_int((int)(0x0CB7)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_B_TO_B_SIZE",SWIG_From_int((int)(0x0CB8)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_A_TO_A_SIZE",SWIG_From_int((int)(0x0CB9)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_S_TO_S",SWIG_From_int((int)(0x0C71)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_I",SWIG_From_int((int)(0x0C70)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_R",SWIG_From_int((int)(0x0C72)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_G",SWIG_From_int((int)(0x0C73)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_B",SWIG_From_int((int)(0x0C74)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_I_TO_A",SWIG_From_int((int)(0x0C75)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_R_TO_R",SWIG_From_int((int)(0x0C76)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_G_TO_G",SWIG_From_int((int)(0x0C77)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_B_TO_B",SWIG_From_int((int)(0x0C78)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MAP_A_TO_A",SWIG_From_int((int)(0x0C79)));
+  SWIG_Python_SetConstant(d, "GL_PACK_ALIGNMENT",SWIG_From_int((int)(0x0D05)));
+  SWIG_Python_SetConstant(d, "GL_PACK_LSB_FIRST",SWIG_From_int((int)(0x0D01)));
+  SWIG_Python_SetConstant(d, "GL_PACK_ROW_LENGTH",SWIG_From_int((int)(0x0D02)));
+  SWIG_Python_SetConstant(d, "GL_PACK_SKIP_PIXELS",SWIG_From_int((int)(0x0D04)));
+  SWIG_Python_SetConstant(d, "GL_PACK_SKIP_ROWS",SWIG_From_int((int)(0x0D03)));
+  SWIG_Python_SetConstant(d, "GL_PACK_SWAP_BYTES",SWIG_From_int((int)(0x0D00)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_ALIGNMENT",SWIG_From_int((int)(0x0CF5)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_LSB_FIRST",SWIG_From_int((int)(0x0CF1)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_ROW_LENGTH",SWIG_From_int((int)(0x0CF2)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_SKIP_PIXELS",SWIG_From_int((int)(0x0CF4)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_SKIP_ROWS",SWIG_From_int((int)(0x0CF3)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_SWAP_BYTES",SWIG_From_int((int)(0x0CF0)));
+  SWIG_Python_SetConstant(d, "GL_ZOOM_X",SWIG_From_int((int)(0x0D16)));
+  SWIG_Python_SetConstant(d, "GL_ZOOM_Y",SWIG_From_int((int)(0x0D17)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_ENV",SWIG_From_int((int)(0x2300)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_ENV_MODE",SWIG_From_int((int)(0x2200)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_1D",SWIG_From_int((int)(0x0DE0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_2D",SWIG_From_int((int)(0x0DE1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_WRAP_S",SWIG_From_int((int)(0x2802)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_WRAP_T",SWIG_From_int((int)(0x2803)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MAG_FILTER",SWIG_From_int((int)(0x2800)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MIN_FILTER",SWIG_From_int((int)(0x2801)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_ENV_COLOR",SWIG_From_int((int)(0x2201)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GEN_S",SWIG_From_int((int)(0x0C60)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GEN_T",SWIG_From_int((int)(0x0C61)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GEN_MODE",SWIG_From_int((int)(0x2500)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BORDER_COLOR",SWIG_From_int((int)(0x1004)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_WIDTH",SWIG_From_int((int)(0x1000)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_HEIGHT",SWIG_From_int((int)(0x1001)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BORDER",SWIG_From_int((int)(0x1005)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COMPONENTS",SWIG_From_int((int)(0x1003)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_RED_SIZE",SWIG_From_int((int)(0x805C)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GREEN_SIZE",SWIG_From_int((int)(0x805D)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BLUE_SIZE",SWIG_From_int((int)(0x805E)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_ALPHA_SIZE",SWIG_From_int((int)(0x805F)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_LUMINANCE_SIZE",SWIG_From_int((int)(0x8060)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_INTENSITY_SIZE",SWIG_From_int((int)(0x8061)));
+  SWIG_Python_SetConstant(d, "GL_NEAREST_MIPMAP_NEAREST",SWIG_From_int((int)(0x2700)));
+  SWIG_Python_SetConstant(d, "GL_NEAREST_MIPMAP_LINEAR",SWIG_From_int((int)(0x2702)));
+  SWIG_Python_SetConstant(d, "GL_LINEAR_MIPMAP_NEAREST",SWIG_From_int((int)(0x2701)));
+  SWIG_Python_SetConstant(d, "GL_LINEAR_MIPMAP_LINEAR",SWIG_From_int((int)(0x2703)));
+  SWIG_Python_SetConstant(d, "GL_OBJECT_LINEAR",SWIG_From_int((int)(0x2401)));
+  SWIG_Python_SetConstant(d, "GL_OBJECT_PLANE",SWIG_From_int((int)(0x2501)));
+  SWIG_Python_SetConstant(d, "GL_EYE_LINEAR",SWIG_From_int((int)(0x2400)));
+  SWIG_Python_SetConstant(d, "GL_EYE_PLANE",SWIG_From_int((int)(0x2502)));
+  SWIG_Python_SetConstant(d, "GL_SPHERE_MAP",SWIG_From_int((int)(0x2402)));
+  SWIG_Python_SetConstant(d, "GL_DECAL",SWIG_From_int((int)(0x2101)));
+  SWIG_Python_SetConstant(d, "GL_MODULATE",SWIG_From_int((int)(0x2100)));
+  SWIG_Python_SetConstant(d, "GL_NEAREST",SWIG_From_int((int)(0x2600)));
+  SWIG_Python_SetConstant(d, "GL_REPEAT",SWIG_From_int((int)(0x2901)));
+  SWIG_Python_SetConstant(d, "GL_CLAMP",SWIG_From_int((int)(0x2900)));
+  SWIG_Python_SetConstant(d, "GL_S",SWIG_From_int((int)(0x2000)));
+  SWIG_Python_SetConstant(d, "GL_T",SWIG_From_int((int)(0x2001)));
+  SWIG_Python_SetConstant(d, "GL_R",SWIG_From_int((int)(0x2002)));
+  SWIG_Python_SetConstant(d, "GL_Q",SWIG_From_int((int)(0x2003)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GEN_R",SWIG_From_int((int)(0x0C62)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_GEN_Q",SWIG_From_int((int)(0x0C63)));
+  SWIG_Python_SetConstant(d, "GL_VENDOR",SWIG_From_int((int)(0x1F00)));
+  SWIG_Python_SetConstant(d, "GL_RENDERER",SWIG_From_int((int)(0x1F01)));
+  SWIG_Python_SetConstant(d, "GL_VERSION",SWIG_From_int((int)(0x1F02)));
+  SWIG_Python_SetConstant(d, "GL_EXTENSIONS",SWIG_From_int((int)(0x1F03)));
+  SWIG_Python_SetConstant(d, "GL_NO_ERROR",SWIG_From_int((int)(0x0)));
+  SWIG_Python_SetConstant(d, "GL_INVALID_ENUM",SWIG_From_int((int)(0x0500)));
+  SWIG_Python_SetConstant(d, "GL_INVALID_VALUE",SWIG_From_int((int)(0x0501)));
+  SWIG_Python_SetConstant(d, "GL_INVALID_OPERATION",SWIG_From_int((int)(0x0502)));
+  SWIG_Python_SetConstant(d, "GL_STACK_OVERFLOW",SWIG_From_int((int)(0x0503)));
+  SWIG_Python_SetConstant(d, "GL_STACK_UNDERFLOW",SWIG_From_int((int)(0x0504)));
+  SWIG_Python_SetConstant(d, "GL_OUT_OF_MEMORY",SWIG_From_int((int)(0x0505)));
+  SWIG_Python_SetConstant(d, "GL_CURRENT_BIT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GL_POINT_BIT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GL_LINE_BIT",SWIG_From_int((int)(0x00000004)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_BIT",SWIG_From_int((int)(0x00000008)));
+  SWIG_Python_SetConstant(d, "GL_POLYGON_STIPPLE_BIT",SWIG_From_int((int)(0x00000010)));
+  SWIG_Python_SetConstant(d, "GL_PIXEL_MODE_BIT",SWIG_From_int((int)(0x00000020)));
+  SWIG_Python_SetConstant(d, "GL_LIGHTING_BIT",SWIG_From_int((int)(0x00000040)));
+  SWIG_Python_SetConstant(d, "GL_FOG_BIT",SWIG_From_int((int)(0x00000080)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_BUFFER_BIT",SWIG_From_int((int)(0x00000100)));
+  SWIG_Python_SetConstant(d, "GL_ACCUM_BUFFER_BIT",SWIG_From_int((int)(0x00000200)));
+  SWIG_Python_SetConstant(d, "GL_STENCIL_BUFFER_BIT",SWIG_From_int((int)(0x00000400)));
+  SWIG_Python_SetConstant(d, "GL_VIEWPORT_BIT",SWIG_From_int((int)(0x00000800)));
+  SWIG_Python_SetConstant(d, "GL_TRANSFORM_BIT",SWIG_From_int((int)(0x00001000)));
+  SWIG_Python_SetConstant(d, "GL_ENABLE_BIT",SWIG_From_int((int)(0x00002000)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_BUFFER_BIT",SWIG_From_int((int)(0x00004000)));
+  SWIG_Python_SetConstant(d, "GL_HINT_BIT",SWIG_From_int((int)(0x00008000)));
+  SWIG_Python_SetConstant(d, "GL_EVAL_BIT",SWIG_From_int((int)(0x00010000)));
+  SWIG_Python_SetConstant(d, "GL_LIST_BIT",SWIG_From_int((int)(0x00020000)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BIT",SWIG_From_int((int)(0x00040000)));
+  SWIG_Python_SetConstant(d, "GL_SCISSOR_BIT",SWIG_From_int((int)(0x00080000)));
+  SWIG_Python_SetConstant(d, "GL_ALL_ATTRIB_BITS",SWIG_From_int((int)(0x000FFFFF)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_TEXTURE_1D",SWIG_From_int((int)(0x8063)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_TEXTURE_2D",SWIG_From_int((int)(0x8064)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_PRIORITY",SWIG_From_int((int)(0x8066)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_RESIDENT",SWIG_From_int((int)(0x8067)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BINDING_1D",SWIG_From_int((int)(0x8068)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BINDING_2D",SWIG_From_int((int)(0x8069)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_INTERNAL_FORMAT",SWIG_From_int((int)(0x1003)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA4",SWIG_From_int((int)(0x803B)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA8",SWIG_From_int((int)(0x803C)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA12",SWIG_From_int((int)(0x803D)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA16",SWIG_From_int((int)(0x803E)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE4",SWIG_From_int((int)(0x803F)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE8",SWIG_From_int((int)(0x8040)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE12",SWIG_From_int((int)(0x8041)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE16",SWIG_From_int((int)(0x8042)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE4_ALPHA4",SWIG_From_int((int)(0x8043)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE6_ALPHA2",SWIG_From_int((int)(0x8044)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE8_ALPHA8",SWIG_From_int((int)(0x8045)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE12_ALPHA4",SWIG_From_int((int)(0x8046)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE12_ALPHA12",SWIG_From_int((int)(0x8047)));
+  SWIG_Python_SetConstant(d, "GL_LUMINANCE16_ALPHA16",SWIG_From_int((int)(0x8048)));
+  SWIG_Python_SetConstant(d, "GL_INTENSITY",SWIG_From_int((int)(0x8049)));
+  SWIG_Python_SetConstant(d, "GL_INTENSITY4",SWIG_From_int((int)(0x804A)));
+  SWIG_Python_SetConstant(d, "GL_INTENSITY8",SWIG_From_int((int)(0x804B)));
+  SWIG_Python_SetConstant(d, "GL_INTENSITY12",SWIG_From_int((int)(0x804C)));
+  SWIG_Python_SetConstant(d, "GL_INTENSITY16",SWIG_From_int((int)(0x804D)));
+  SWIG_Python_SetConstant(d, "GL_R3_G3_B2",SWIG_From_int((int)(0x2A10)));
+  SWIG_Python_SetConstant(d, "GL_RGB4",SWIG_From_int((int)(0x804F)));
+  SWIG_Python_SetConstant(d, "GL_RGB5",SWIG_From_int((int)(0x8050)));
+  SWIG_Python_SetConstant(d, "GL_RGB8",SWIG_From_int((int)(0x8051)));
+  SWIG_Python_SetConstant(d, "GL_RGB10",SWIG_From_int((int)(0x8052)));
+  SWIG_Python_SetConstant(d, "GL_RGB12",SWIG_From_int((int)(0x8053)));
+  SWIG_Python_SetConstant(d, "GL_RGB16",SWIG_From_int((int)(0x8054)));
+  SWIG_Python_SetConstant(d, "GL_RGBA2",SWIG_From_int((int)(0x8055)));
+  SWIG_Python_SetConstant(d, "GL_RGBA4",SWIG_From_int((int)(0x8056)));
+  SWIG_Python_SetConstant(d, "GL_RGB5_A1",SWIG_From_int((int)(0x8057)));
+  SWIG_Python_SetConstant(d, "GL_RGBA8",SWIG_From_int((int)(0x8058)));
+  SWIG_Python_SetConstant(d, "GL_RGB10_A2",SWIG_From_int((int)(0x8059)));
+  SWIG_Python_SetConstant(d, "GL_RGBA12",SWIG_From_int((int)(0x805A)));
+  SWIG_Python_SetConstant(d, "GL_RGBA16",SWIG_From_int((int)(0x805B)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_PIXEL_STORE_BIT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_VERTEX_ARRAY_BIT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GL_ALL_CLIENT_ATTRIB_BITS",SWIG_From_int((int)(0xFFFFFFFF)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_ALL_ATTRIB_BITS",SWIG_From_int((int)(0xFFFFFFFF)));
+  SWIG_Python_SetConstant(d, "GL_RESCALE_NORMAL",SWIG_From_int((int)(0x803A)));
+  SWIG_Python_SetConstant(d, "GL_CLAMP_TO_EDGE",SWIG_From_int((int)(0x812F)));
+  SWIG_Python_SetConstant(d, "GL_MAX_ELEMENTS_VERTICES",SWIG_From_int((int)(0x80E8)));
+  SWIG_Python_SetConstant(d, "GL_MAX_ELEMENTS_INDICES",SWIG_From_int((int)(0x80E9)));
+  SWIG_Python_SetConstant(d, "GL_BGR",SWIG_From_int((int)(0x80E0)));
+  SWIG_Python_SetConstant(d, "GL_BGRA",SWIG_From_int((int)(0x80E1)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_BYTE_3_3_2",SWIG_From_int((int)(0x8032)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_BYTE_2_3_3_REV",SWIG_From_int((int)(0x8362)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_5_6_5",SWIG_From_int((int)(0x8363)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_5_6_5_REV",SWIG_From_int((int)(0x8364)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_4_4_4_4",SWIG_From_int((int)(0x8033)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_4_4_4_4_REV",SWIG_From_int((int)(0x8365)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_5_5_5_1",SWIG_From_int((int)(0x8034)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_1_5_5_5_REV",SWIG_From_int((int)(0x8366)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_8_8_8_8",SWIG_From_int((int)(0x8035)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_8_8_8_8_REV",SWIG_From_int((int)(0x8367)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_10_10_10_2",SWIG_From_int((int)(0x8036)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_2_10_10_10_REV",SWIG_From_int((int)(0x8368)));
+  SWIG_Python_SetConstant(d, "GL_LIGHT_MODEL_COLOR_CONTROL",SWIG_From_int((int)(0x81F8)));
+  SWIG_Python_SetConstant(d, "GL_SINGLE_COLOR",SWIG_From_int((int)(0x81F9)));
+  SWIG_Python_SetConstant(d, "GL_SEPARATE_SPECULAR_COLOR",SWIG_From_int((int)(0x81FA)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MIN_LOD",SWIG_From_int((int)(0x813A)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MAX_LOD",SWIG_From_int((int)(0x813B)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BASE_LEVEL",SWIG_From_int((int)(0x813C)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_MAX_LEVEL",SWIG_From_int((int)(0x813D)));
+  SWIG_Python_SetConstant(d, "GL_SMOOTH_POINT_SIZE_RANGE",SWIG_From_int((int)(0x0B12)));
+  SWIG_Python_SetConstant(d, "GL_SMOOTH_POINT_SIZE_GRANULARITY",SWIG_From_int((int)(0x0B13)));
+  SWIG_Python_SetConstant(d, "GL_SMOOTH_LINE_WIDTH_RANGE",SWIG_From_int((int)(0x0B22)));
+  SWIG_Python_SetConstant(d, "GL_SMOOTH_LINE_WIDTH_GRANULARITY",SWIG_From_int((int)(0x0B23)));
+  SWIG_Python_SetConstant(d, "GL_ALIASED_POINT_SIZE_RANGE",SWIG_From_int((int)(0x846D)));
+  SWIG_Python_SetConstant(d, "GL_ALIASED_LINE_WIDTH_RANGE",SWIG_From_int((int)(0x846E)));
+  SWIG_Python_SetConstant(d, "GL_PACK_SKIP_IMAGES",SWIG_From_int((int)(0x806B)));
+  SWIG_Python_SetConstant(d, "GL_PACK_IMAGE_HEIGHT",SWIG_From_int((int)(0x806C)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_SKIP_IMAGES",SWIG_From_int((int)(0x806D)));
+  SWIG_Python_SetConstant(d, "GL_UNPACK_IMAGE_HEIGHT",SWIG_From_int((int)(0x806E)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_3D",SWIG_From_int((int)(0x806F)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_TEXTURE_3D",SWIG_From_int((int)(0x8070)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_DEPTH",SWIG_From_int((int)(0x8071)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_WRAP_R",SWIG_From_int((int)(0x8072)));
+  SWIG_Python_SetConstant(d, "GL_MAX_3D_TEXTURE_SIZE",SWIG_From_int((int)(0x8073)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BINDING_3D",SWIG_From_int((int)(0x806A)));
+  SWIG_Python_SetConstant(d, "GL_CONSTANT_COLOR",SWIG_From_int((int)(0x8001)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_CONSTANT_COLOR",SWIG_From_int((int)(0x8002)));
+  SWIG_Python_SetConstant(d, "GL_CONSTANT_ALPHA",SWIG_From_int((int)(0x8003)));
+  SWIG_Python_SetConstant(d, "GL_ONE_MINUS_CONSTANT_ALPHA",SWIG_From_int((int)(0x8004)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE",SWIG_From_int((int)(0x80D0)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_COLOR_TABLE",SWIG_From_int((int)(0x80D1)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_COLOR_TABLE",SWIG_From_int((int)(0x80D2)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_COLOR_TABLE",SWIG_From_int((int)(0x80D3)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE",SWIG_From_int((int)(0x80D4)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE",SWIG_From_int((int)(0x80D5)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_SCALE",SWIG_From_int((int)(0x80D6)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_BIAS",SWIG_From_int((int)(0x80D7)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_FORMAT",SWIG_From_int((int)(0x80D8)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_WIDTH",SWIG_From_int((int)(0x80D9)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_RED_SIZE",SWIG_From_int((int)(0x80DA)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_GREEN_SIZE",SWIG_From_int((int)(0x80DB)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_BLUE_SIZE",SWIG_From_int((int)(0x80DC)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_ALPHA_SIZE",SWIG_From_int((int)(0x80DD)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_LUMINANCE_SIZE",SWIG_From_int((int)(0x80DE)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_TABLE_INTENSITY_SIZE",SWIG_From_int((int)(0x80DF)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_1D",SWIG_From_int((int)(0x8010)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_2D",SWIG_From_int((int)(0x8011)));
+  SWIG_Python_SetConstant(d, "GL_SEPARABLE_2D",SWIG_From_int((int)(0x8012)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_BORDER_MODE",SWIG_From_int((int)(0x8013)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_FILTER_SCALE",SWIG_From_int((int)(0x8014)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_FILTER_BIAS",SWIG_From_int((int)(0x8015)));
+  SWIG_Python_SetConstant(d, "GL_REDUCE",SWIG_From_int((int)(0x8016)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_FORMAT",SWIG_From_int((int)(0x8017)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_WIDTH",SWIG_From_int((int)(0x8018)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_HEIGHT",SWIG_From_int((int)(0x8019)));
+  SWIG_Python_SetConstant(d, "GL_MAX_CONVOLUTION_WIDTH",SWIG_From_int((int)(0x801A)));
+  SWIG_Python_SetConstant(d, "GL_MAX_CONVOLUTION_HEIGHT",SWIG_From_int((int)(0x801B)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_RED_SCALE",SWIG_From_int((int)(0x801C)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_GREEN_SCALE",SWIG_From_int((int)(0x801D)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_BLUE_SCALE",SWIG_From_int((int)(0x801E)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_ALPHA_SCALE",SWIG_From_int((int)(0x801F)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_RED_BIAS",SWIG_From_int((int)(0x8020)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_GREEN_BIAS",SWIG_From_int((int)(0x8021)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_BLUE_BIAS",SWIG_From_int((int)(0x8022)));
+  SWIG_Python_SetConstant(d, "GL_POST_CONVOLUTION_ALPHA_BIAS",SWIG_From_int((int)(0x8023)));
+  SWIG_Python_SetConstant(d, "GL_CONSTANT_BORDER",SWIG_From_int((int)(0x8151)));
+  SWIG_Python_SetConstant(d, "GL_REPLICATE_BORDER",SWIG_From_int((int)(0x8153)));
+  SWIG_Python_SetConstant(d, "GL_CONVOLUTION_BORDER_COLOR",SWIG_From_int((int)(0x8154)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_MATRIX",SWIG_From_int((int)(0x80B1)));
+  SWIG_Python_SetConstant(d, "GL_COLOR_MATRIX_STACK_DEPTH",SWIG_From_int((int)(0x80B2)));
+  SWIG_Python_SetConstant(d, "GL_MAX_COLOR_MATRIX_STACK_DEPTH",SWIG_From_int((int)(0x80B3)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_RED_SCALE",SWIG_From_int((int)(0x80B4)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_GREEN_SCALE",SWIG_From_int((int)(0x80B5)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_BLUE_SCALE",SWIG_From_int((int)(0x80B6)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_ALPHA_SCALE",SWIG_From_int((int)(0x80B7)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_RED_BIAS",SWIG_From_int((int)(0x80B8)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_GREEN_BIAS",SWIG_From_int((int)(0x80B9)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_BLUE_BIAS",SWIG_From_int((int)(0x80BA)));
+  SWIG_Python_SetConstant(d, "GL_POST_COLOR_MATRIX_ALPHA_BIAS",SWIG_From_int((int)(0x80BB)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM",SWIG_From_int((int)(0x8024)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_HISTOGRAM",SWIG_From_int((int)(0x8025)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_WIDTH",SWIG_From_int((int)(0x8026)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_FORMAT",SWIG_From_int((int)(0x8027)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_RED_SIZE",SWIG_From_int((int)(0x8028)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_GREEN_SIZE",SWIG_From_int((int)(0x8029)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_BLUE_SIZE",SWIG_From_int((int)(0x802A)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_ALPHA_SIZE",SWIG_From_int((int)(0x802B)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_LUMINANCE_SIZE",SWIG_From_int((int)(0x802C)));
+  SWIG_Python_SetConstant(d, "GL_HISTOGRAM_SINK",SWIG_From_int((int)(0x802D)));
+  SWIG_Python_SetConstant(d, "GL_MINMAX",SWIG_From_int((int)(0x802E)));
+  SWIG_Python_SetConstant(d, "GL_MINMAX_FORMAT",SWIG_From_int((int)(0x802F)));
+  SWIG_Python_SetConstant(d, "GL_MINMAX_SINK",SWIG_From_int((int)(0x8030)));
+  SWIG_Python_SetConstant(d, "GL_TABLE_TOO_LARGE",SWIG_From_int((int)(0x8031)));
+  SWIG_Python_SetConstant(d, "GL_BLEND_EQUATION",SWIG_From_int((int)(0x8009)));
+  SWIG_Python_SetConstant(d, "GL_MIN",SWIG_From_int((int)(0x8007)));
+  SWIG_Python_SetConstant(d, "GL_MAX",SWIG_From_int((int)(0x8008)));
+  SWIG_Python_SetConstant(d, "GL_FUNC_ADD",SWIG_From_int((int)(0x8006)));
+  SWIG_Python_SetConstant(d, "GL_FUNC_SUBTRACT",SWIG_From_int((int)(0x800A)));
+  SWIG_Python_SetConstant(d, "GL_FUNC_REVERSE_SUBTRACT",SWIG_From_int((int)(0x800B)));
+  SWIG_Python_SetConstant(d, "GL_BLEND_COLOR",SWIG_From_int((int)(0x8005)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE0",SWIG_From_int((int)(0x84C0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE1",SWIG_From_int((int)(0x84C1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE2",SWIG_From_int((int)(0x84C2)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE3",SWIG_From_int((int)(0x84C3)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE4",SWIG_From_int((int)(0x84C4)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE5",SWIG_From_int((int)(0x84C5)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE6",SWIG_From_int((int)(0x84C6)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE7",SWIG_From_int((int)(0x84C7)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE8",SWIG_From_int((int)(0x84C8)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE9",SWIG_From_int((int)(0x84C9)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE10",SWIG_From_int((int)(0x84CA)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE11",SWIG_From_int((int)(0x84CB)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE12",SWIG_From_int((int)(0x84CC)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE13",SWIG_From_int((int)(0x84CD)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE14",SWIG_From_int((int)(0x84CE)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE15",SWIG_From_int((int)(0x84CF)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE16",SWIG_From_int((int)(0x84D0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE17",SWIG_From_int((int)(0x84D1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE18",SWIG_From_int((int)(0x84D2)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE19",SWIG_From_int((int)(0x84D3)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE20",SWIG_From_int((int)(0x84D4)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE21",SWIG_From_int((int)(0x84D5)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE22",SWIG_From_int((int)(0x84D6)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE23",SWIG_From_int((int)(0x84D7)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE24",SWIG_From_int((int)(0x84D8)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE25",SWIG_From_int((int)(0x84D9)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE26",SWIG_From_int((int)(0x84DA)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE27",SWIG_From_int((int)(0x84DB)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE28",SWIG_From_int((int)(0x84DC)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE29",SWIG_From_int((int)(0x84DD)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE30",SWIG_From_int((int)(0x84DE)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE31",SWIG_From_int((int)(0x84DF)));
+  SWIG_Python_SetConstant(d, "GL_ACTIVE_TEXTURE",SWIG_From_int((int)(0x84E0)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_ACTIVE_TEXTURE",SWIG_From_int((int)(0x84E1)));
+  SWIG_Python_SetConstant(d, "GL_MAX_TEXTURE_UNITS",SWIG_From_int((int)(0x84E2)));
+  SWIG_Python_SetConstant(d, "GL_NORMAL_MAP",SWIG_From_int((int)(0x8511)));
+  SWIG_Python_SetConstant(d, "GL_REFLECTION_MAP",SWIG_From_int((int)(0x8512)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP",SWIG_From_int((int)(0x8513)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_BINDING_CUBE_MAP",SWIG_From_int((int)(0x8514)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_POSITIVE_X",SWIG_From_int((int)(0x8515)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X",SWIG_From_int((int)(0x8516)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y",SWIG_From_int((int)(0x8517)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y",SWIG_From_int((int)(0x8518)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z",SWIG_From_int((int)(0x8519)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z",SWIG_From_int((int)(0x851A)));
+  SWIG_Python_SetConstant(d, "GL_PROXY_TEXTURE_CUBE_MAP",SWIG_From_int((int)(0x851B)));
+  SWIG_Python_SetConstant(d, "GL_MAX_CUBE_MAP_TEXTURE_SIZE",SWIG_From_int((int)(0x851C)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_ALPHA",SWIG_From_int((int)(0x84E9)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_LUMINANCE",SWIG_From_int((int)(0x84EA)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_LUMINANCE_ALPHA",SWIG_From_int((int)(0x84EB)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_INTENSITY",SWIG_From_int((int)(0x84EC)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_RGB",SWIG_From_int((int)(0x84ED)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_RGBA",SWIG_From_int((int)(0x84EE)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COMPRESSION_HINT",SWIG_From_int((int)(0x84EF)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COMPRESSED_IMAGE_SIZE",SWIG_From_int((int)(0x86A0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE_COMPRESSED",SWIG_From_int((int)(0x86A1)));
+  SWIG_Python_SetConstant(d, "GL_NUM_COMPRESSED_TEXTURE_FORMATS",SWIG_From_int((int)(0x86A2)));
+  SWIG_Python_SetConstant(d, "GL_COMPRESSED_TEXTURE_FORMATS",SWIG_From_int((int)(0x86A3)));
+  SWIG_Python_SetConstant(d, "GL_MULTISAMPLE",SWIG_From_int((int)(0x809D)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_ALPHA_TO_COVERAGE",SWIG_From_int((int)(0x809E)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_ALPHA_TO_ONE",SWIG_From_int((int)(0x809F)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_COVERAGE",SWIG_From_int((int)(0x80A0)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_BUFFERS",SWIG_From_int((int)(0x80A8)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLES",SWIG_From_int((int)(0x80A9)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_COVERAGE_VALUE",SWIG_From_int((int)(0x80AA)));
+  SWIG_Python_SetConstant(d, "GL_SAMPLE_COVERAGE_INVERT",SWIG_From_int((int)(0x80AB)));
+  SWIG_Python_SetConstant(d, "GL_MULTISAMPLE_BIT",SWIG_From_int((int)(0x20000000)));
+  SWIG_Python_SetConstant(d, "GL_TRANSPOSE_MODELVIEW_MATRIX",SWIG_From_int((int)(0x84E3)));
+  SWIG_Python_SetConstant(d, "GL_TRANSPOSE_PROJECTION_MATRIX",SWIG_From_int((int)(0x84E4)));
+  SWIG_Python_SetConstant(d, "GL_TRANSPOSE_TEXTURE_MATRIX",SWIG_From_int((int)(0x84E5)));
+  SWIG_Python_SetConstant(d, "GL_TRANSPOSE_COLOR_MATRIX",SWIG_From_int((int)(0x84E6)));
+  SWIG_Python_SetConstant(d, "GL_COMBINE",SWIG_From_int((int)(0x8570)));
+  SWIG_Python_SetConstant(d, "GL_COMBINE_RGB",SWIG_From_int((int)(0x8571)));
+  SWIG_Python_SetConstant(d, "GL_COMBINE_ALPHA",SWIG_From_int((int)(0x8572)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE0_RGB",SWIG_From_int((int)(0x8580)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE1_RGB",SWIG_From_int((int)(0x8581)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE2_RGB",SWIG_From_int((int)(0x8582)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE0_ALPHA",SWIG_From_int((int)(0x8588)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE1_ALPHA",SWIG_From_int((int)(0x8589)));
+  SWIG_Python_SetConstant(d, "GL_SOURCE2_ALPHA",SWIG_From_int((int)(0x858A)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND0_RGB",SWIG_From_int((int)(0x8590)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND1_RGB",SWIG_From_int((int)(0x8591)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND2_RGB",SWIG_From_int((int)(0x8592)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND0_ALPHA",SWIG_From_int((int)(0x8598)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND1_ALPHA",SWIG_From_int((int)(0x8599)));
+  SWIG_Python_SetConstant(d, "GL_OPERAND2_ALPHA",SWIG_From_int((int)(0x859A)));
+  SWIG_Python_SetConstant(d, "GL_RGB_SCALE",SWIG_From_int((int)(0x8573)));
+  SWIG_Python_SetConstant(d, "GL_ADD_SIGNED",SWIG_From_int((int)(0x8574)));
+  SWIG_Python_SetConstant(d, "GL_INTERPOLATE",SWIG_From_int((int)(0x8575)));
+  SWIG_Python_SetConstant(d, "GL_SUBTRACT",SWIG_From_int((int)(0x84E7)));
+  SWIG_Python_SetConstant(d, "GL_CONSTANT",SWIG_From_int((int)(0x8576)));
+  SWIG_Python_SetConstant(d, "GL_PRIMARY_COLOR",SWIG_From_int((int)(0x8577)));
+  SWIG_Python_SetConstant(d, "GL_PREVIOUS",SWIG_From_int((int)(0x8578)));
+  SWIG_Python_SetConstant(d, "GL_DOT3_RGB",SWIG_From_int((int)(0x86AE)));
+  SWIG_Python_SetConstant(d, "GL_DOT3_RGBA",SWIG_From_int((int)(0x86AF)));
+  SWIG_Python_SetConstant(d, "GL_CLAMP_TO_BORDER",SWIG_From_int((int)(0x812D)));
+  SWIG_Python_SetConstant(d, "GL_ARB_multitexture",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE0_ARB",SWIG_From_int((int)(0x84C0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE1_ARB",SWIG_From_int((int)(0x84C1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE2_ARB",SWIG_From_int((int)(0x84C2)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE3_ARB",SWIG_From_int((int)(0x84C3)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE4_ARB",SWIG_From_int((int)(0x84C4)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE5_ARB",SWIG_From_int((int)(0x84C5)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE6_ARB",SWIG_From_int((int)(0x84C6)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE7_ARB",SWIG_From_int((int)(0x84C7)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE8_ARB",SWIG_From_int((int)(0x84C8)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE9_ARB",SWIG_From_int((int)(0x84C9)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE10_ARB",SWIG_From_int((int)(0x84CA)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE11_ARB",SWIG_From_int((int)(0x84CB)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE12_ARB",SWIG_From_int((int)(0x84CC)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE13_ARB",SWIG_From_int((int)(0x84CD)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE14_ARB",SWIG_From_int((int)(0x84CE)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE15_ARB",SWIG_From_int((int)(0x84CF)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE16_ARB",SWIG_From_int((int)(0x84D0)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE17_ARB",SWIG_From_int((int)(0x84D1)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE18_ARB",SWIG_From_int((int)(0x84D2)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE19_ARB",SWIG_From_int((int)(0x84D3)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE20_ARB",SWIG_From_int((int)(0x84D4)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE21_ARB",SWIG_From_int((int)(0x84D5)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE22_ARB",SWIG_From_int((int)(0x84D6)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE23_ARB",SWIG_From_int((int)(0x84D7)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE24_ARB",SWIG_From_int((int)(0x84D8)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE25_ARB",SWIG_From_int((int)(0x84D9)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE26_ARB",SWIG_From_int((int)(0x84DA)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE27_ARB",SWIG_From_int((int)(0x84DB)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE28_ARB",SWIG_From_int((int)(0x84DC)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE29_ARB",SWIG_From_int((int)(0x84DD)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE30_ARB",SWIG_From_int((int)(0x84DE)));
+  SWIG_Python_SetConstant(d, "GL_TEXTURE31_ARB",SWIG_From_int((int)(0x84DF)));
+  SWIG_Python_SetConstant(d, "GL_ACTIVE_TEXTURE_ARB",SWIG_From_int((int)(0x84E0)));
+  SWIG_Python_SetConstant(d, "GL_CLIENT_ACTIVE_TEXTURE_ARB",SWIG_From_int((int)(0x84E1)));
+  SWIG_Python_SetConstant(d, "GL_MAX_TEXTURE_UNITS_ARB",SWIG_From_int((int)(0x84E2)));
+  SWIG_Python_SetConstant(d, "GL_MESA_packed_depth_stencil",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_DEPTH_STENCIL_MESA",SWIG_From_int((int)(0x8750)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_24_8_MESA",SWIG_From_int((int)(0x8751)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_INT_8_24_REV_MESA",SWIG_From_int((int)(0x8752)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_15_1_MESA",SWIG_From_int((int)(0x8753)));
+  SWIG_Python_SetConstant(d, "GL_UNSIGNED_SHORT_1_15_REV_MESA",SWIG_From_int((int)(0x8754)));
+  SWIG_Python_SetConstant(d, "GL_MESA_program_debug",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_FRAGMENT_PROGRAM_POSITION_MESA",SWIG_From_int((int)(0x8bb0)));
+  SWIG_Python_SetConstant(d, "GL_FRAGMENT_PROGRAM_CALLBACK_MESA",SWIG_From_int((int)(0x8bb1)));
+  SWIG_Python_SetConstant(d, "GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA",SWIG_From_int((int)(0x8bb2)));
+  SWIG_Python_SetConstant(d, "GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA",SWIG_From_int((int)(0x8bb3)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_PROGRAM_POSITION_MESA",SWIG_From_int((int)(0x8bb4)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_PROGRAM_CALLBACK_MESA",SWIG_From_int((int)(0x8bb5)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA",SWIG_From_int((int)(0x8bb6)));
+  SWIG_Python_SetConstant(d, "GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA",SWIG_From_int((int)(0x8bb7)));
+  SWIG_Python_SetConstant(d, "GL_ATI_blend_equation_separate",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GL_ALPHA_BLEND_EQUATION_ATI",SWIG_From_int((int)(0x883D)));
+}
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glu_i.h
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glu_i.h	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glu_i.h	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,348 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+** 
+** http://oss.sgi.com/projects/FreeB
+** 
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+** 
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+** 
+** Additional Notice Provisions: This software was created using the
+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
+** not been independently verified as being compliant with the OpenGL(R)
+** version 1.2.1 Specification.
+*/
+
+#ifndef __glu_h__
+#define __glu_h__
+
+#if defined(USE_MGL_NAMESPACE)
+#include "glu_mangle.h"
+#endif
+
+#include <GL/gl.h>
+
+#ifndef GL
+#define GL
+#endif
+
+#ifndef GLP
+#define GLP GL *
+#endif
+
+#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
+# undef GLAPI
+# define GLAPI __declspec(dllexport)
+#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
+/* tag specifying we're building for DLL runtime support */
+# undef GLAPI
+# define GLAPI __declspec(dllimport)
+#elif !defined(GLAPI)
+/* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+#endif /* _STATIC_MESA support */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************************************************/
+
+/* Extensions */
+#define GLU_EXT_object_space_tess          1
+#define GLU_EXT_nurbs_tessellator          1
+
+/* Boolean */
+#define GLU_FALSE                          0
+#define GLU_TRUE                           1
+
+/* Version */
+#define GLU_VERSION_1_1                    1
+#define GLU_VERSION_1_2                    1
+#define GLU_VERSION_1_3                    1
+
+/* StringName */
+#define GLU_VERSION                        100800
+#define GLU_EXTENSIONS                     100801
+
+/* ErrorCode */
+#define GLU_INVALID_ENUM                   100900
+#define GLU_INVALID_VALUE                  100901
+#define GLU_OUT_OF_MEMORY                  100902
+#define GLU_INCOMPATIBLE_GL_VERSION        100903
+#define GLU_INVALID_OPERATION              100904
+
+/* NurbsDisplay */
+/*      GLU_FILL */
+#define GLU_OUTLINE_POLYGON                100240
+#define GLU_OUTLINE_PATCH                  100241
+
+/* NurbsCallback */
+#define GLU_NURBS_ERROR                    100103
+#define GLU_ERROR                          100103
+#define GLU_NURBS_BEGIN                    100164
+#define GLU_NURBS_BEGIN_EXT                100164
+#define GLU_NURBS_VERTEX                   100165
+#define GLU_NURBS_VERTEX_EXT               100165
+#define GLU_NURBS_NORMAL                   100166
+#define GLU_NURBS_NORMAL_EXT               100166
+#define GLU_NURBS_COLOR                    100167
+#define GLU_NURBS_COLOR_EXT                100167
+#define GLU_NURBS_TEXTURE_COORD            100168
+#define GLU_NURBS_TEX_COORD_EXT            100168
+#define GLU_NURBS_END                      100169
+#define GLU_NURBS_END_EXT                  100169
+#define GLU_NURBS_BEGIN_DATA               100170
+#define GLU_NURBS_BEGIN_DATA_EXT           100170
+#define GLU_NURBS_VERTEX_DATA              100171
+#define GLU_NURBS_VERTEX_DATA_EXT          100171
+#define GLU_NURBS_NORMAL_DATA              100172
+#define GLU_NURBS_NORMAL_DATA_EXT          100172
+#define GLU_NURBS_COLOR_DATA               100173
+#define GLU_NURBS_COLOR_DATA_EXT           100173
+#define GLU_NURBS_TEXTURE_COORD_DATA       100174
+#define GLU_NURBS_TEX_COORD_DATA_EXT       100174
+#define GLU_NURBS_END_DATA                 100175
+#define GLU_NURBS_END_DATA_EXT             100175
+
+/* NurbsError */
+#define GLU_NURBS_ERROR1                   100251
+#define GLU_NURBS_ERROR2                   100252
+#define GLU_NURBS_ERROR3                   100253
+#define GLU_NURBS_ERROR4                   100254
+#define GLU_NURBS_ERROR5                   100255
+#define GLU_NURBS_ERROR6                   100256
+#define GLU_NURBS_ERROR7                   100257
+#define GLU_NURBS_ERROR8                   100258
+#define GLU_NURBS_ERROR9                   100259
+#define GLU_NURBS_ERROR10                  100260
+#define GLU_NURBS_ERROR11                  100261
+#define GLU_NURBS_ERROR12                  100262
+#define GLU_NURBS_ERROR13                  100263
+#define GLU_NURBS_ERROR14                  100264
+#define GLU_NURBS_ERROR15                  100265
+#define GLU_NURBS_ERROR16                  100266
+#define GLU_NURBS_ERROR17                  100267
+#define GLU_NURBS_ERROR18                  100268
+#define GLU_NURBS_ERROR19                  100269
+#define GLU_NURBS_ERROR20                  100270
+#define GLU_NURBS_ERROR21                  100271
+#define GLU_NURBS_ERROR22                  100272
+#define GLU_NURBS_ERROR23                  100273
+#define GLU_NURBS_ERROR24                  100274
+#define GLU_NURBS_ERROR25                  100275
+#define GLU_NURBS_ERROR26                  100276
+#define GLU_NURBS_ERROR27                  100277
+#define GLU_NURBS_ERROR28                  100278
+#define GLU_NURBS_ERROR29                  100279
+#define GLU_NURBS_ERROR30                  100280
+#define GLU_NURBS_ERROR31                  100281
+#define GLU_NURBS_ERROR32                  100282
+#define GLU_NURBS_ERROR33                  100283
+#define GLU_NURBS_ERROR34                  100284
+#define GLU_NURBS_ERROR35                  100285
+#define GLU_NURBS_ERROR36                  100286
+#define GLU_NURBS_ERROR37                  100287
+
+/* NurbsProperty */
+#define GLU_AUTO_LOAD_MATRIX               100200
+#define GLU_CULLING                        100201
+#define GLU_SAMPLING_TOLERANCE             100203
+#define GLU_DISPLAY_MODE                   100204
+#define GLU_PARAMETRIC_TOLERANCE           100202
+#define GLU_SAMPLING_METHOD                100205
+#define GLU_U_STEP                         100206
+#define GLU_V_STEP                         100207
+#define GLU_NURBS_MODE                     100160
+#define GLU_NURBS_MODE_EXT                 100160
+#define GLU_NURBS_TESSELLATOR              100161
+#define GLU_NURBS_TESSELLATOR_EXT          100161
+#define GLU_NURBS_RENDERER                 100162
+#define GLU_NURBS_RENDERER_EXT             100162
+
+/* NurbsSampling */
+#define GLU_OBJECT_PARAMETRIC_ERROR        100208
+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
+#define GLU_OBJECT_PATH_LENGTH             100209
+#define GLU_OBJECT_PATH_LENGTH_EXT         100209
+#define GLU_PATH_LENGTH                    100215
+#define GLU_PARAMETRIC_ERROR               100216
+#define GLU_DOMAIN_DISTANCE                100217
+
+/* NurbsTrim */
+#define GLU_MAP1_TRIM_2                    100210
+#define GLU_MAP1_TRIM_3                    100211
+
+/* QuadricDrawStyle */
+#define GLU_POINT                          100010
+#define GLU_LINE                           100011
+#define GLU_FILL                           100012
+#define GLU_SILHOUETTE                     100013
+
+/* QuadricCallback */
+/*      GLU_ERROR */
+
+/* QuadricNormal */
+#define GLU_SMOOTH                         100000
+#define GLU_FLAT                           100001
+#define GLU_NONE                           100002
+
+/* QuadricOrientation */
+#define GLU_OUTSIDE                        100020
+#define GLU_INSIDE                         100021
+
+/* TessCallback */
+#define GLU_TESS_BEGIN                     100100
+#define GLU_BEGIN                          100100
+#define GLU_TESS_VERTEX                    100101
+#define GLU_VERTEX                         100101
+#define GLU_TESS_END                       100102
+#define GLU_END                            100102
+#define GLU_TESS_ERROR                     100103
+#define GLU_TESS_EDGE_FLAG                 100104
+#define GLU_EDGE_FLAG                      100104
+#define GLU_TESS_COMBINE                   100105
+#define GLU_TESS_BEGIN_DATA                100106
+#define GLU_TESS_VERTEX_DATA               100107
+#define GLU_TESS_END_DATA                  100108
+#define GLU_TESS_ERROR_DATA                100109
+#define GLU_TESS_EDGE_FLAG_DATA            100110
+#define GLU_TESS_COMBINE_DATA              100111
+
+/* TessContour */
+#define GLU_CW                             100120
+#define GLU_CCW                            100121
+#define GLU_INTERIOR                       100122
+#define GLU_EXTERIOR                       100123
+#define GLU_UNKNOWN                        100124
+
+/* TessProperty */
+#define GLU_TESS_WINDING_RULE              100140
+#define GLU_TESS_BOUNDARY_ONLY             100141
+#define GLU_TESS_TOLERANCE                 100142
+
+/* TessError */
+#define GLU_TESS_ERROR1                    100151
+#define GLU_TESS_ERROR2                    100152
+#define GLU_TESS_ERROR3                    100153
+#define GLU_TESS_ERROR4                    100154
+#define GLU_TESS_ERROR5                    100155
+#define GLU_TESS_ERROR6                    100156
+#define GLU_TESS_ERROR7                    100157
+#define GLU_TESS_ERROR8                    100158
+#define GLU_TESS_MISSING_BEGIN_POLYGON     100151
+#define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
+#define GLU_TESS_MISSING_END_POLYGON       100153
+#define GLU_TESS_MISSING_END_CONTOUR       100154
+#define GLU_TESS_COORD_TOO_LARGE           100155
+#define GLU_TESS_NEED_COMBINE_     100156
+
+/* TessWinding */
+#define GLU_TESS_WINDING_ODD               100130
+#define GLU_TESS_WINDING_NONZERO           100131
+#define GLU_TESS_WINDING_POSITIVE          100132
+#define GLU_TESS_WINDING_NEGATIVE          100133
+#define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
+
+/*************************************************************/
+
+
+#ifdef __cplusplus
+class GLUnurbs;
+class GLUquadric;
+class GLUtesselator;
+#else
+typedef struct GLUnurbs GLUnurbs;
+typedef struct GLUquadric GLUquadric;
+typedef struct GLUtesselator GLUtesselator;
+#endif
+
+typedef GLUnurbs GLUnurbsObj;
+typedef GLUquadric GLUquadricObj;
+typedef GLUtesselator GLUtesselatorObj;
+typedef GLUtesselator GLUtriangulatorObj;
+
+#define GLU_TESS_MAX_COORD 1.0e150
+
+/* Internal convenience typedefs */
+typedef void (GLP _GLUfuncptr)();
+
+GLAPI void GL gluBeginCurve (GLUnurbs* nurb);
+GLAPI void GL gluBeginPolygon (GLUtesselator* tess);
+GLAPI void GL gluBeginSurface (GLUnurbs* nurb);
+GLAPI void GL gluBeginTrim (GLUnurbs* nurb);
+GLAPI GLint GL gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GL gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
+GLAPI GLint GL gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GL gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
+GLAPI GLint GL gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GL gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+GLAPI GLboolean GL gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
+GLAPI void GL gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
+GLAPI void GL gluDeleteNurbsRenderer (GLUnurbs* nurb);
+GLAPI void GL gluDeleteQuadric (GLUquadric* quad);
+GLAPI void GL gluDeleteTess (GLUtesselator* tess);
+GLAPI void GL gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
+GLAPI void GL gluEndCurve (GLUnurbs* nurb);
+GLAPI void GL gluEndPolygon (GLUtesselator* tess);
+GLAPI void GL gluEndSurface (GLUnurbs* nurb);
+GLAPI void GL gluEndTrim (GLUnurbs* nurb);
+GLAPI const GLubyte * GL gluErrorString (GLenum error);
+GLAPI void GL gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
+GLAPI const GLubyte * GL gluGetString (GLenum name);
+GLAPI void GL gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
+GLAPI void GL gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
+GLAPI void GL gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
+GLAPI GLUnurbs* GL gluNewNurbsRenderer (void);
+GLAPI GLUquadric* GL gluNewQuadric (void);
+GLAPI GLUtesselator* GL gluNewTess (void);
+GLAPI void GL gluNextContour (GLUtesselator* tess, GLenum type);
+GLAPI void GL gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GL gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GL gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GL gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
+GLAPI void GL gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
+GLAPI void GL gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
+GLAPI void GL gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
+GLAPI void GL gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
+GLAPI void GL gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
+GLAPI void GL gluPickMatrix( GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint xxx[4]);
+GLAPI GLint GL gluProject( GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble xxx[16], const GLdouble xxx[16], const GLint xxx[4], GLdouble* winX, GLdouble* winY, GLdouble* winZ);
+GLAPI void GL gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
+GLAPI void GL gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GL gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
+GLAPI void GL gluQuadricNormals (GLUquadric* quad, GLenum normal);
+GLAPI void GL gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
+GLAPI void GL gluQuadricTexture (GLUquadric* quad, GLboolean texture);
+GLAPI GLint GL gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
+GLAPI void GL gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
+GLAPI void GL gluTessBeginContour (GLUtesselator* tess);
+GLAPI void GL gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
+GLAPI void GL gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GL gluTessEndContour (GLUtesselator* tess);
+GLAPI void GL gluTessEndPolygon (GLUtesselator* tess);
+GLAPI void GL gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
+GLAPI void GL gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
+GLAPI void GL gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
+GLAPI GLint GL gluUnProject( GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble xxx[16], const GLdouble xxx[16], const GLint xxx[4], GLdouble* objX, GLdouble* objY, GLdouble* objZ);
+GLAPI GLint GL gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glu_h__ */

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib.py
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib.py	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib.py	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,267 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.33
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _glulib
+import new
+new_instancemethod = new.instancemethod
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'PySwigObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError,name
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+    _object = types.ObjectType
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+del types
+
+
+GLU_EXT_object_space_tess = _glulib.GLU_EXT_object_space_tess
+GLU_EXT_nurbs_tessellator = _glulib.GLU_EXT_nurbs_tessellator
+GLU_FALSE = _glulib.GLU_FALSE
+GLU_TRUE = _glulib.GLU_TRUE
+GLU_VERSION_1_1 = _glulib.GLU_VERSION_1_1
+GLU_VERSION_1_2 = _glulib.GLU_VERSION_1_2
+GLU_VERSION_1_3 = _glulib.GLU_VERSION_1_3
+GLU_VERSION = _glulib.GLU_VERSION
+GLU_EXTENSIONS = _glulib.GLU_EXTENSIONS
+GLU_INVALID_ENUM = _glulib.GLU_INVALID_ENUM
+GLU_INVALID_VALUE = _glulib.GLU_INVALID_VALUE
+GLU_OUT_OF_MEMORY = _glulib.GLU_OUT_OF_MEMORY
+GLU_INCOMPATIBLE_GL_VERSION = _glulib.GLU_INCOMPATIBLE_GL_VERSION
+GLU_INVALID_OPERATION = _glulib.GLU_INVALID_OPERATION
+GLU_OUTLINE_POLYGON = _glulib.GLU_OUTLINE_POLYGON
+GLU_OUTLINE_PATCH = _glulib.GLU_OUTLINE_PATCH
+GLU_NURBS_ERROR = _glulib.GLU_NURBS_ERROR
+GLU_ERROR = _glulib.GLU_ERROR
+GLU_NURBS_BEGIN = _glulib.GLU_NURBS_BEGIN
+GLU_NURBS_BEGIN_EXT = _glulib.GLU_NURBS_BEGIN_EXT
+GLU_NURBS_VERTEX = _glulib.GLU_NURBS_VERTEX
+GLU_NURBS_VERTEX_EXT = _glulib.GLU_NURBS_VERTEX_EXT
+GLU_NURBS_NORMAL = _glulib.GLU_NURBS_NORMAL
+GLU_NURBS_NORMAL_EXT = _glulib.GLU_NURBS_NORMAL_EXT
+GLU_NURBS_COLOR = _glulib.GLU_NURBS_COLOR
+GLU_NURBS_COLOR_EXT = _glulib.GLU_NURBS_COLOR_EXT
+GLU_NURBS_TEXTURE_COORD = _glulib.GLU_NURBS_TEXTURE_COORD
+GLU_NURBS_TEX_COORD_EXT = _glulib.GLU_NURBS_TEX_COORD_EXT
+GLU_NURBS_END = _glulib.GLU_NURBS_END
+GLU_NURBS_END_EXT = _glulib.GLU_NURBS_END_EXT
+GLU_NURBS_BEGIN_DATA = _glulib.GLU_NURBS_BEGIN_DATA
+GLU_NURBS_BEGIN_DATA_EXT = _glulib.GLU_NURBS_BEGIN_DATA_EXT
+GLU_NURBS_VERTEX_DATA = _glulib.GLU_NURBS_VERTEX_DATA
+GLU_NURBS_VERTEX_DATA_EXT = _glulib.GLU_NURBS_VERTEX_DATA_EXT
+GLU_NURBS_NORMAL_DATA = _glulib.GLU_NURBS_NORMAL_DATA
+GLU_NURBS_NORMAL_DATA_EXT = _glulib.GLU_NURBS_NORMAL_DATA_EXT
+GLU_NURBS_COLOR_DATA = _glulib.GLU_NURBS_COLOR_DATA
+GLU_NURBS_COLOR_DATA_EXT = _glulib.GLU_NURBS_COLOR_DATA_EXT
+GLU_NURBS_TEXTURE_COORD_DATA = _glulib.GLU_NURBS_TEXTURE_COORD_DATA
+GLU_NURBS_TEX_COORD_DATA_EXT = _glulib.GLU_NURBS_TEX_COORD_DATA_EXT
+GLU_NURBS_END_DATA = _glulib.GLU_NURBS_END_DATA
+GLU_NURBS_END_DATA_EXT = _glulib.GLU_NURBS_END_DATA_EXT
+GLU_NURBS_ERROR1 = _glulib.GLU_NURBS_ERROR1
+GLU_NURBS_ERROR2 = _glulib.GLU_NURBS_ERROR2
+GLU_NURBS_ERROR3 = _glulib.GLU_NURBS_ERROR3
+GLU_NURBS_ERROR4 = _glulib.GLU_NURBS_ERROR4
+GLU_NURBS_ERROR5 = _glulib.GLU_NURBS_ERROR5
+GLU_NURBS_ERROR6 = _glulib.GLU_NURBS_ERROR6
+GLU_NURBS_ERROR7 = _glulib.GLU_NURBS_ERROR7
+GLU_NURBS_ERROR8 = _glulib.GLU_NURBS_ERROR8
+GLU_NURBS_ERROR9 = _glulib.GLU_NURBS_ERROR9
+GLU_NURBS_ERROR10 = _glulib.GLU_NURBS_ERROR10
+GLU_NURBS_ERROR11 = _glulib.GLU_NURBS_ERROR11
+GLU_NURBS_ERROR12 = _glulib.GLU_NURBS_ERROR12
+GLU_NURBS_ERROR13 = _glulib.GLU_NURBS_ERROR13
+GLU_NURBS_ERROR14 = _glulib.GLU_NURBS_ERROR14
+GLU_NURBS_ERROR15 = _glulib.GLU_NURBS_ERROR15
+GLU_NURBS_ERROR16 = _glulib.GLU_NURBS_ERROR16
+GLU_NURBS_ERROR17 = _glulib.GLU_NURBS_ERROR17
+GLU_NURBS_ERROR18 = _glulib.GLU_NURBS_ERROR18
+GLU_NURBS_ERROR19 = _glulib.GLU_NURBS_ERROR19
+GLU_NURBS_ERROR20 = _glulib.GLU_NURBS_ERROR20
+GLU_NURBS_ERROR21 = _glulib.GLU_NURBS_ERROR21
+GLU_NURBS_ERROR22 = _glulib.GLU_NURBS_ERROR22
+GLU_NURBS_ERROR23 = _glulib.GLU_NURBS_ERROR23
+GLU_NURBS_ERROR24 = _glulib.GLU_NURBS_ERROR24
+GLU_NURBS_ERROR25 = _glulib.GLU_NURBS_ERROR25
+GLU_NURBS_ERROR26 = _glulib.GLU_NURBS_ERROR26
+GLU_NURBS_ERROR27 = _glulib.GLU_NURBS_ERROR27
+GLU_NURBS_ERROR28 = _glulib.GLU_NURBS_ERROR28
+GLU_NURBS_ERROR29 = _glulib.GLU_NURBS_ERROR29
+GLU_NURBS_ERROR30 = _glulib.GLU_NURBS_ERROR30
+GLU_NURBS_ERROR31 = _glulib.GLU_NURBS_ERROR31
+GLU_NURBS_ERROR32 = _glulib.GLU_NURBS_ERROR32
+GLU_NURBS_ERROR33 = _glulib.GLU_NURBS_ERROR33
+GLU_NURBS_ERROR34 = _glulib.GLU_NURBS_ERROR34
+GLU_NURBS_ERROR35 = _glulib.GLU_NURBS_ERROR35
+GLU_NURBS_ERROR36 = _glulib.GLU_NURBS_ERROR36
+GLU_NURBS_ERROR37 = _glulib.GLU_NURBS_ERROR37
+GLU_AUTO_LOAD_MATRIX = _glulib.GLU_AUTO_LOAD_MATRIX
+GLU_CULLING = _glulib.GLU_CULLING
+GLU_SAMPLING_TOLERANCE = _glulib.GLU_SAMPLING_TOLERANCE
+GLU_DISPLAY_MODE = _glulib.GLU_DISPLAY_MODE
+GLU_PARAMETRIC_TOLERANCE = _glulib.GLU_PARAMETRIC_TOLERANCE
+GLU_SAMPLING_METHOD = _glulib.GLU_SAMPLING_METHOD
+GLU_U_STEP = _glulib.GLU_U_STEP
+GLU_V_STEP = _glulib.GLU_V_STEP
+GLU_NURBS_MODE = _glulib.GLU_NURBS_MODE
+GLU_NURBS_MODE_EXT = _glulib.GLU_NURBS_MODE_EXT
+GLU_NURBS_TESSELLATOR = _glulib.GLU_NURBS_TESSELLATOR
+GLU_NURBS_TESSELLATOR_EXT = _glulib.GLU_NURBS_TESSELLATOR_EXT
+GLU_NURBS_RENDERER = _glulib.GLU_NURBS_RENDERER
+GLU_NURBS_RENDERER_EXT = _glulib.GLU_NURBS_RENDERER_EXT
+GLU_OBJECT_PARAMETRIC_ERROR = _glulib.GLU_OBJECT_PARAMETRIC_ERROR
+GLU_OBJECT_PARAMETRIC_ERROR_EXT = _glulib.GLU_OBJECT_PARAMETRIC_ERROR_EXT
+GLU_OBJECT_PATH_LENGTH = _glulib.GLU_OBJECT_PATH_LENGTH
+GLU_OBJECT_PATH_LENGTH_EXT = _glulib.GLU_OBJECT_PATH_LENGTH_EXT
+GLU_PATH_LENGTH = _glulib.GLU_PATH_LENGTH
+GLU_PARAMETRIC_ERROR = _glulib.GLU_PARAMETRIC_ERROR
+GLU_DOMAIN_DISTANCE = _glulib.GLU_DOMAIN_DISTANCE
+GLU_MAP1_TRIM_2 = _glulib.GLU_MAP1_TRIM_2
+GLU_MAP1_TRIM_3 = _glulib.GLU_MAP1_TRIM_3
+GLU_POINT = _glulib.GLU_POINT
+GLU_LINE = _glulib.GLU_LINE
+GLU_FILL = _glulib.GLU_FILL
+GLU_SILHOUETTE = _glulib.GLU_SILHOUETTE
+GLU_SMOOTH = _glulib.GLU_SMOOTH
+GLU_FLAT = _glulib.GLU_FLAT
+GLU_NONE = _glulib.GLU_NONE
+GLU_OUTSIDE = _glulib.GLU_OUTSIDE
+GLU_INSIDE = _glulib.GLU_INSIDE
+GLU_TESS_BEGIN = _glulib.GLU_TESS_BEGIN
+GLU_BEGIN = _glulib.GLU_BEGIN
+GLU_TESS_VERTEX = _glulib.GLU_TESS_VERTEX
+GLU_VERTEX = _glulib.GLU_VERTEX
+GLU_TESS_END = _glulib.GLU_TESS_END
+GLU_END = _glulib.GLU_END
+GLU_TESS_ERROR = _glulib.GLU_TESS_ERROR
+GLU_TESS_EDGE_FLAG = _glulib.GLU_TESS_EDGE_FLAG
+GLU_EDGE_FLAG = _glulib.GLU_EDGE_FLAG
+GLU_TESS_COMBINE = _glulib.GLU_TESS_COMBINE
+GLU_TESS_BEGIN_DATA = _glulib.GLU_TESS_BEGIN_DATA
+GLU_TESS_VERTEX_DATA = _glulib.GLU_TESS_VERTEX_DATA
+GLU_TESS_END_DATA = _glulib.GLU_TESS_END_DATA
+GLU_TESS_ERROR_DATA = _glulib.GLU_TESS_ERROR_DATA
+GLU_TESS_EDGE_FLAG_DATA = _glulib.GLU_TESS_EDGE_FLAG_DATA
+GLU_TESS_COMBINE_DATA = _glulib.GLU_TESS_COMBINE_DATA
+GLU_CW = _glulib.GLU_CW
+GLU_CCW = _glulib.GLU_CCW
+GLU_INTERIOR = _glulib.GLU_INTERIOR
+GLU_EXTERIOR = _glulib.GLU_EXTERIOR
+GLU_UNKNOWN = _glulib.GLU_UNKNOWN
+GLU_TESS_WINDING_RULE = _glulib.GLU_TESS_WINDING_RULE
+GLU_TESS_BOUNDARY_ONLY = _glulib.GLU_TESS_BOUNDARY_ONLY
+GLU_TESS_TOLERANCE = _glulib.GLU_TESS_TOLERANCE
+GLU_TESS_ERROR1 = _glulib.GLU_TESS_ERROR1
+GLU_TESS_ERROR2 = _glulib.GLU_TESS_ERROR2
+GLU_TESS_ERROR3 = _glulib.GLU_TESS_ERROR3
+GLU_TESS_ERROR4 = _glulib.GLU_TESS_ERROR4
+GLU_TESS_ERROR5 = _glulib.GLU_TESS_ERROR5
+GLU_TESS_ERROR6 = _glulib.GLU_TESS_ERROR6
+GLU_TESS_ERROR7 = _glulib.GLU_TESS_ERROR7
+GLU_TESS_ERROR8 = _glulib.GLU_TESS_ERROR8
+GLU_TESS_MISSING_BEGIN_POLYGON = _glulib.GLU_TESS_MISSING_BEGIN_POLYGON
+GLU_TESS_MISSING_BEGIN_CONTOUR = _glulib.GLU_TESS_MISSING_BEGIN_CONTOUR
+GLU_TESS_MISSING_END_POLYGON = _glulib.GLU_TESS_MISSING_END_POLYGON
+GLU_TESS_MISSING_END_CONTOUR = _glulib.GLU_TESS_MISSING_END_CONTOUR
+GLU_TESS_COORD_TOO_LARGE = _glulib.GLU_TESS_COORD_TOO_LARGE
+GLU_TESS_NEED_COMBINE_ = _glulib.GLU_TESS_NEED_COMBINE_
+GLU_TESS_WINDING_ODD = _glulib.GLU_TESS_WINDING_ODD
+GLU_TESS_WINDING_NONZERO = _glulib.GLU_TESS_WINDING_NONZERO
+GLU_TESS_WINDING_POSITIVE = _glulib.GLU_TESS_WINDING_POSITIVE
+GLU_TESS_WINDING_NEGATIVE = _glulib.GLU_TESS_WINDING_NEGATIVE
+GLU_TESS_WINDING_ABS_GEQ_TWO = _glulib.GLU_TESS_WINDING_ABS_GEQ_TWO
+GLU_TESS_MAX_COORD = _glulib.GLU_TESS_MAX_COORD
+gluBeginCurve = _glulib.gluBeginCurve
+gluBeginPolygon = _glulib.gluBeginPolygon
+gluBeginSurface = _glulib.gluBeginSurface
+gluBeginTrim = _glulib.gluBeginTrim
+gluBuild1DMipmapLevels = _glulib.gluBuild1DMipmapLevels
+gluBuild1DMipmaps = _glulib.gluBuild1DMipmaps
+gluBuild2DMipmapLevels = _glulib.gluBuild2DMipmapLevels
+gluBuild2DMipmaps = _glulib.gluBuild2DMipmaps
+gluBuild3DMipmapLevels = _glulib.gluBuild3DMipmapLevels
+gluBuild3DMipmaps = _glulib.gluBuild3DMipmaps
+gluCheckExtension = _glulib.gluCheckExtension
+gluCylinder = _glulib.gluCylinder
+gluDeleteNurbsRenderer = _glulib.gluDeleteNurbsRenderer
+gluDeleteQuadric = _glulib.gluDeleteQuadric
+gluDeleteTess = _glulib.gluDeleteTess
+gluDisk = _glulib.gluDisk
+gluEndCurve = _glulib.gluEndCurve
+gluEndPolygon = _glulib.gluEndPolygon
+gluEndSurface = _glulib.gluEndSurface
+gluEndTrim = _glulib.gluEndTrim
+gluGetNurbsProperty = _glulib.gluGetNurbsProperty
+gluGetString = _glulib.gluGetString
+gluGetTessProperty = _glulib.gluGetTessProperty
+gluLoadSamplingMatrices = _glulib.gluLoadSamplingMatrices
+gluLookAt = _glulib.gluLookAt
+gluNewNurbsRenderer = _glulib.gluNewNurbsRenderer
+gluNewQuadric = _glulib.gluNewQuadric
+gluNewTess = _glulib.gluNewTess
+gluNextContour = _glulib.gluNextContour
+gluNurbsCallbackData = _glulib.gluNurbsCallbackData
+gluNurbsCallbackDataEXT = _glulib.gluNurbsCallbackDataEXT
+gluNurbsCurve = _glulib.gluNurbsCurve
+gluNurbsProperty = _glulib.gluNurbsProperty
+gluNurbsSurface = _glulib.gluNurbsSurface
+gluOrtho2D = _glulib.gluOrtho2D
+gluPartialDisk = _glulib.gluPartialDisk
+gluPerspective = _glulib.gluPerspective
+gluPickMatrix = _glulib.gluPickMatrix
+gluProject = _glulib.gluProject
+gluPwlCurve = _glulib.gluPwlCurve
+gluQuadricDrawStyle = _glulib.gluQuadricDrawStyle
+gluQuadricNormals = _glulib.gluQuadricNormals
+gluQuadricOrientation = _glulib.gluQuadricOrientation
+gluQuadricTexture = _glulib.gluQuadricTexture
+gluScaleImage = _glulib.gluScaleImage
+gluSphere = _glulib.gluSphere
+gluTessBeginContour = _glulib.gluTessBeginContour
+gluTessBeginPolygon = _glulib.gluTessBeginPolygon
+gluTessEndContour = _glulib.gluTessEndContour
+gluTessEndPolygon = _glulib.gluTessEndPolygon
+gluTessNormal = _glulib.gluTessNormal
+gluTessProperty = _glulib.gluTessProperty
+gluTessVertex = _glulib.gluTessVertex
+gluUnProject = _glulib.gluUnProject
+gluUnProject4 = _glulib.gluUnProject4
+
+cvar = _glulib.cvar
+gluErrorString = _glulib.gluErrorString
+gluNurbsCallback = _glulib.gluNurbsCallback
+gluQuadricCallback = _glulib.gluQuadricCallback
+gluTessCallback = _glulib.gluTessCallback
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib_wrap.c
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib_wrap.c	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glulib_wrap.c	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,9316 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.33
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic CAPI SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "3"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The swig conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old swig versions, you usually write code as:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit as:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   that seems to be the same, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   requires also to SWIG_ConvertPtr to return new result values, as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   swig errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+
+
+ */
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store inforomation on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/* think of this as a c++ template<> or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty)         \
+  if (ty) {                                             \
+    swig_cast_info *iter = ty->cast;                    \
+    while (iter) {                                      \
+      if (comparison) {                                 \
+        if (iter == ty->cast) return iter;              \
+        /* Move iter to the top of the linked list */   \
+        iter->prev->next = iter->next;                  \
+        if (iter->next)                                 \
+          iter->next->prev = iter->prev;                \
+        iter->next = ty->cast;                          \
+        iter->prev = 0;                                 \
+        if (ty->cast) ty->cast->prev = iter;            \
+        ty->cast = iter;                                \
+        return iter;                                    \
+      }                                                 \
+      iter = iter->next;                                \
+    }                                                   \
+  }                                                     \
+  return 0
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
+}
+
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+  SWIG_TypeCheck_Template(iter->type == from, into);
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_Format(PyExc_RuntimeError, mesg);
+  }
+}
+
+
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, (char *) msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+  PyDict_SetItemString(d, (char*) name, obj);
+  Py_DECREF(obj);                            
+}
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* PySwigClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+} PySwigClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME PySwigClientData * 
+PySwigClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+PySwigClientData_Del(PySwigClientData* data)
+{
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== PySwigObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+} PySwigObject;
+
+SWIGRUNTIME PyObject *
+PySwigObject_long(PySwigObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_format(const char* fmt, PySwigObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
+      PyObject *ofmt = PyString_FromString(fmt);
+      if (ofmt) {
+	res = PyString_Format(ofmt,args);
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_oct(PySwigObject *v)
+{
+  return PySwigObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_hex(PySwigObject *v)
+{
+  return PySwigObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+PySwigObject_repr(PySwigObject *v)
+#else
+PySwigObject_repr(PySwigObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *hex = PySwigObject_hex(v);    
+  PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
+  Py_DECREF(hex);
+  if (v->next) {
+#ifdef METH_NOARGS
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
+#else
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
+#endif
+    PyString_ConcatAndDel(&repr,nrep);
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+#ifdef METH_NOARGS
+  PyObject *repr = PySwigObject_repr(v);
+#else
+  PyObject *repr = PySwigObject_repr(v, NULL);
+#endif
+  if (repr) {
+    fputs(PyString_AsString(repr), fp);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_str(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    PyString_FromString(result) : 0;
+}
+
+SWIGRUNTIME int
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigObject_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigObject_type())
+    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+PySwigObject_dealloc(PyObject *v)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own) {
+    swig_type_info *ty = sobj->ty;
+    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporal object to carry the destroy operation */
+	PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } else {
+      const char *name = SWIG_TypePrettyName(ty);
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
+#endif
+    }
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+PySwigObject_append(PyObject* v, PyObject* next)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!PySwigObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+PySwigObject_next(PyObject* v)
+#else
+PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_disown(PyObject *v)
+#else
+PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_acquire(PyObject *v)
+#else
+PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+PySwigObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      PySwigObject *sobj = (PySwigObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v);
+	} else {
+	  PySwigObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v,args);
+	} else {
+	  PySwigObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+PySwigObject_getattr(PySwigObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+_PySwigObject_type(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods PySwigObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    (binaryfunc)0, /*nb_divide*/
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+    (coercion)0,   /*nb_coerce*/
+    (unaryfunc)PySwigObject_long, /*nb_int*/
+    (unaryfunc)PySwigObject_long, /*nb_long*/
+    (unaryfunc)0,                 /*nb_float*/
+    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
+    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject pyswigobject_type;  
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */
+	(char *)"PySwigObject",		    /* tp_name */
+	sizeof(PySwigObject),		    /* tp_basicsize */
+	0,			            /* tp_itemsize */
+	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
+	(printfunc)PySwigObject_print,	    /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
+#else
+	(getattrfunc)0,			    /* tp_getattr */ 
+#endif
+	(setattrfunc)0,			    /* tp_setattr */ 
+	(cmpfunc)PySwigObject_compare,	    /* tp_compare */ 
+	(reprfunc)PySwigObject_repr,	    /* tp_repr */    
+	&PySwigObject_as_number,	    /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)PySwigObject_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigobject_doc, 	            /* tp_doc */        
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	swigobject_methods,		    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0,	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigobject_type = tmp;
+    pyswigobject_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigobject_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} PySwigPacked;
+
+SWIGRUNTIME int
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+PySwigPacked_repr(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_str(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return PyString_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return PyString_FromString(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigPacked_Check(PyObject *op) {
+  return ((op)->ob_type == _PySwigPacked_type()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+}
+
+SWIGRUNTIME void
+PySwigPacked_dealloc(PyObject *v)
+{
+  if (PySwigPacked_Check(v)) {
+    PySwigPacked *sobj = (PySwigPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+_PySwigPacked_type(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject pyswigpacked_type;
+  static int type_init = 0;  
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */	
+	(char *)"PySwigPacked",		    /* tp_name */	
+	sizeof(PySwigPacked),		    /* tp_basicsize */	
+	0,				    /* tp_itemsize */	
+	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)PySwigPacked_print,	    /* tp_print */   	
+	(getattrfunc)0,			    /* tp_getattr */ 	
+	(setattrfunc)0,			    /* tp_setattr */ 	
+	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
+	(reprfunc)PySwigPacked_repr,	    /* tp_repr */    	
+	0,	                            /* tp_as_number */	
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */	
+	(hashfunc)0,			    /* tp_hash */	
+	(ternaryfunc)0,			    /* tp_call */	
+	(reprfunc)PySwigPacked_str,	    /* tp_str */	
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigpacked_doc, 	            /* tp_doc */
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	0,		                    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0, 	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigpacked_type = tmp;
+    pyswigpacked_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigpacked_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (PySwigPacked_Check(obj)) {
+    PySwigPacked *sobj = (PySwigPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+  return PyString_FromString("this");
+}
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+SWIGRUNTIME PySwigObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  if (PySwigObject_Check(pyobj)) {
+    return (PySwigObject *) pyobj;
+  } else {
+    PyObject *obj = 0;
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+    if (PyInstance_Check(pyobj)) {
+      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+    } else {
+      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+      } else {
+#ifdef PyWeakref_CheckProxy
+	if (PyWeakref_CheckProxy(pyobj)) {
+	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+	}
+#endif
+	obj = PyObject_GetAttr(pyobj,SWIG_This());
+	if (obj) {
+	  Py_DECREF(obj);
+	} else {
+	  if (PyErr_Occurred()) PyErr_Clear();
+	  return 0;
+	}
+      }
+    }
+#else
+    obj = PyObject_GetAttr(pyobj,SWIG_This());
+    if (obj) {
+      Py_DECREF(obj);
+    } else {
+      if (PyErr_Occurred()) PyErr_Clear();
+      return 0;
+    }
+#endif
+    if (obj && !PySwigObject_Check(obj)) {
+      /* a PyObject is called 'this', try to get the 'real this'
+	 PySwigObject from it */ 
+      return SWIG_Python_GetSwigThis(obj);
+    }
+    return (PySwigObject *)obj;
+  }
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own) {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  if (!obj) return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr) *ptr = 0;
+    return SWIG_OK;
+  } else {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    while (sobj) {
+      void *vptr = sobj->ptr;
+      if (ty) {
+	swig_type_info *to = sobj->ty;
+	if (to == ty) {
+	  /* no type cast needed */
+	  if (ptr) *ptr = vptr;
+	  break;
+	} else {
+	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+	  if (!tc) {
+	    sobj = (PySwigObject *)sobj->next;
+	  } else {
+	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+	    break;
+	  }
+	}
+      } else {
+	if (ptr) *ptr = vptr;
+	break;
+      }
+    }
+    if (sobj) {
+      if (own) *own = sobj->own;
+      if (flags & SWIG_POINTER_DISOWN) {
+	sobj->own = 0;
+      }
+      return SWIG_OK;
+    } else {
+      int res = SWIG_ERROR;
+      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+	PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+	if (data && !data->implicitconv) {
+	  PyObject *klass = data->klass;
+	  if (klass) {
+	    PyObject *impconv;
+	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+	    impconv = SWIG_Python_CallFunctor(klass, obj);
+	    data->implicitconv = 0;
+	    if (PyErr_Occurred()) {
+	      PyErr_Clear();
+	      impconv = 0;
+	    }
+	    if (impconv) {
+	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      if (iobj) {
+		void *vptr;
+		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+		if (SWIG_IsOK(res)) {
+		  if (ptr) {
+		    *ptr = vptr;
+		    /* transfer the ownership to 'ptr' */
+		    iobj->own = 0;
+		    res = SWIG_AddCast(res);
+		    res = SWIG_AddNewMask(res);
+		  } else {
+		    res = SWIG_AddCast(res);		    
+		  }
+		}
+	      }
+	      Py_DECREF(impconv);
+	    }
+	  }
+	}
+      }
+      return res;
+    }
+  }
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc) {
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+      if (!desc) return SWIG_ERROR;
+    }
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (!tc) return SWIG_ERROR;
+      *ptr = SWIG_TypeCast(tc,vptr);
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, whitout calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      PySwigObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
+  if (!ptr) {
+    return SWIG_Py_Void();
+  } else {
+    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+    PyObject *robj = PySwigObject_New(ptr, type, own);
+    PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
+    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+      if (inst) {
+	Py_DECREF(robj);
+	robj = inst;
+      }
+    }
+    return robj;
+  }
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+SWIG_Python_DestroyModule(void *vptr)
+{
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
+      if (data) PySwigClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
+
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				   swig_empty_runtime_method_table);
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = PyString_FromString(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+      }
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigObject_GetDesc(PyObject *self)
+{
+  PySwigObject *v = (PySwigObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && PySwigObject_Check(obj)) {
+      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? PyString_AsString(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+    if (flags & SWIG_POINTER_EXCEPTION) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+  }
+  return result;
+}
+
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_GLUnurbs swig_types[0]
+#define SWIGTYPE_p_GLUquadric swig_types[1]
+#define SWIGTYPE_p_GLUtesselator swig_types[2]
+#define SWIGTYPE_p_char swig_types[3]
+#define SWIGTYPE_p_double swig_types[4]
+#define SWIGTYPE_p_f___void swig_types[5]
+#define SWIGTYPE_p_f_unsigned_long__void swig_types[6]
+#define SWIGTYPE_p_float swig_types[7]
+#define SWIGTYPE_p_long swig_types[8]
+#define SWIGTYPE_p_short swig_types[9]
+#define SWIGTYPE_p_signed_char swig_types[10]
+#define SWIGTYPE_p_unsigned_char swig_types[11]
+#define SWIGTYPE_p_unsigned_long swig_types[12]
+#define SWIGTYPE_p_unsigned_short swig_types[13]
+#define SWIGTYPE_p_void swig_types[14]
+static swig_type_info *swig_types[16];
+static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _glulib.so
+  ------------------------------------------------*/
+#define SWIG_init    init_glulib
+
+#define SWIG_name    "_glulib"
+
+#define SWIGVERSION 0x010333 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _MSC_VER
+# include <windows.h>
+#endif
+
+#ifdef __APPLE__
+#include <OpenGL/glu.h>
+#else
+#include <GL/glu.h>
+#endif
+
+#include <pythonplus.h>
+#include "callback.h"
+
+static PyObject_t glu_error_string( PyObject_t self, PyObject_t args)
+{
+  int errcode;
+  char const* result;
+
+  if(NOT PyArg_ParseTuple(args, "i", &errcode)) return NULL;
+
+  result = (char const*)gluErrorString( (GLenum)errcode);
+  
+  return result ? PyString_InternFromString( result)
+    : (Py_INCREF( Py_None), Py_None);
+}
+
+
+int checkArraySize = 1;
+int checkArgumentsInCWrapper=1;
+
+#include "numpy/arrayobject.h"
+
+int NumericTypecode(char *type)
+{
+  /* maps GL types to Numeric types */
+  if (strcmp(type,"GLbyte")==0) return NPY_BYTE;
+  else if (strcmp(type,"GLdouble")==0) return NPY_DOUBLE;
+  else if (strcmp(type,"GLfloat")==0) return NPY_FLOAT;
+  else if (strcmp(type,"GLint")==0) return NPY_INT;
+  else if (strcmp(type,"GLshort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLubyte")==0) return NPY_UBYTE;
+  else if (strcmp(type,"GLuint")==0) return NPY_INT;
+  else if (strcmp(type,"GLushort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLboolean")==0) return NPY_UBYTE;
+}
+
+/*********************************************
+   1. Check if the incomming object is a buffer object.
+   2. If buffer - check if it is a numeric array.
+   3. If numeric array -  check if it is contiguous - 
+        return 1.
+   4. If buffer but not a numeric array - return 1.
+   5. In all other cases return 0.
+*******************************************/
+int isContiguosBuffer(PyObject *incommingObject)
+{
+  int contig;
+  /** Check if object is a buffer object **/
+  /** if (PyBuffer_Check(incommingObject)) **/
+  PyBufferProcs *pb = incommingObject->ob_type->tp_as_buffer;
+  if (pb == NULL || pb->bf_getsegcount == NULL )
+    contig = 0;
+  else
+  {
+    /** printf ("object is a buffer\n"); **/
+    if (PyArray_Check(incommingObject))
+    {
+      /** printf ("object is a Numeric array\n"); **/
+      if (PyArray_ISCONTIGUOUS((PyArrayObject*)incommingObject))
+	contig = 1;
+      else contig = 0;	
+    }
+    else
+      contig = 1; 
+  }
+  return contig;
+}
+/**********************************************************
+This function takes a Python object and creates a Numeric Array 
+after checking that the incomming object is of an acceptable
+type(size).
+***********************************************************/
+
+void bufferWithCheck(PyObject *incommingObject, 
+		     PyArrayObject **Narray,
+                     char *type, int nbElem)
+{
+  char buf[255];
+  int typecode, size, i;
+  /**PyArrayObject *Narray; */
+  /* make contiguous if needed */
+  typecode = NumericTypecode(type);
+  *Narray = (PyArrayObject *)PyArray_ContiguousFromObject(incommingObject,
+							typecode, 0, 10 );
+  if (*Narray == NULL) 
+  {
+    sprintf(buf,"Failed to make a contiguous array of type %d\n",
+            typecode);
+    PyErr_SetString(PyExc_ValueError, buf);
+         *Narray =  NULL;
+  }
+   if (checkArraySize && nbElem)
+   {
+     /* check size */
+     size = 1;
+     for (i=0; i<((*Narray)->nd); i++)
+     size = size * ((*Narray)->dimensions[i]);
+     if (size!=nbElem) 
+     {
+       sprintf(buf, "%d values received when %d expected\n", size, nbElem);
+       PyErr_SetString(PyExc_ValueError, buf);
+       *Narray = NULL;
+     }
+   }
+}
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+  #define SWIG_From_long   PyInt_FromLong 
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+#include "opengltk.h"
+
+static struct opengltk_export* s_opengltk = NULL;
+PyObject_t PypImport_ModuleAttr( char const* modulename, char const* name)
+{
+  PyObject_t module, result;
+  module = PyImport_ImportModule( (char*)modulename);
+  if (NOT module) return NULL;
+  result = PyObject_GetAttrString( module, (char*)name);
+  Py_DECREF( module);
+  return result;
+}
+
+void* PypImport_ModuleCobjAttr( char const* module, char const* name)
+{
+  PyObject_t attr;
+  void* result;
+
+  attr = PypImport_ModuleAttr( module, name);
+  if (NOT attr) return NULL;
+  result = PyCObject_AsVoidPtr( attr);
+  Py_DECREF( attr);
+  return result;
+}
+
+
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+  #define SWIG_From_double   PyFloat_FromDouble 
+
+
+SWIGINTERNINLINE PyObject* 
+SWIG_From_unsigned_SS_long  (unsigned long value)
+{
+  return (value > LONG_MAX) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); 
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_char  (unsigned char value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_float (PyObject * obj, float *val)
+{
+  double v;
+  int res = SWIG_AsVal_double (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < -FLT_MAX || v > FLT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (float)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UCHAR_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned char)(v);
+    }
+  }  
+  return res;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN int Swig_var_checkArgumentsInCWrapper_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""checkArgumentsInCWrapper""' of type '""int""'");
+    }
+    checkArgumentsInCWrapper = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_checkArgumentsInCWrapper_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(checkArgumentsInCWrapper));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCallback__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLenum arg2 ;
+  void_GLenum_f arg3 = (void_GLenum_f) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluNurbsCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsCallback" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNurbsCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_unsigned_long__void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluNurbsCallback" "', argument " "3"" of type '" "void_GLenum_f""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricCallback__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLenum arg2 ;
+  void_GLenum_f arg3 = (void_GLenum_f) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluQuadricCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricCallback" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_unsigned_long__void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluQuadricCallback" "', argument " "3"" of type '" "void_GLenum_f""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessCallback__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLenum arg2 ;
+  void_GLenum_f arg3 = (void_GLenum_f) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluTessCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessCallback" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluTessCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_unsigned_long__void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluTessCallback" "', argument " "3"" of type '" "void_GLenum_f""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBeginCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluBeginCurve",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluBeginCurve" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluBeginCurve(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBeginPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluBeginPolygon",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluBeginPolygon" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluBeginPolygon(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBeginSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluBeginSurface",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluBeginSurface" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluBeginSurface(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBeginTrim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluBeginTrim",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluBeginTrim" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluBeginTrim(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild1DMipmapLevels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  GLenum arg5 ;
+  GLint arg6 ;
+  GLint arg7 ;
+  GLint arg8 ;
+  void *arg9 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  unsigned long val4 ;
+  int ecode4 = 0 ;
+  unsigned long val5 ;
+  int ecode5 = 0 ;
+  long val6 ;
+  int ecode6 = 0 ;
+  long val7 ;
+  int ecode7 = 0 ;
+  long val8 ;
+  int ecode8 = 0 ;
+  int res9 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:gluBuild1DMipmapLevels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild1DMipmapLevels" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild1DMipmapLevels" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild1DMipmapLevels" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild1DMipmapLevels" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild1DMipmapLevels" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluBuild1DMipmapLevels" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluBuild1DMipmapLevels" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  ecode8 = SWIG_AsVal_long(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluBuild1DMipmapLevels" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  res9 = SWIG_ConvertPtr(obj8,SWIG_as_voidptrptr(&arg9), 0, 0);
+  if (!SWIG_IsOK(res9)) {
+    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "gluBuild1DMipmapLevels" "', argument " "9"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild1DMipmapLevels(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(void const *)arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild1DMipmaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  GLenum arg5 ;
+  void *arg6 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  unsigned long val4 ;
+  int ecode4 = 0 ;
+  unsigned long val5 ;
+  int ecode5 = 0 ;
+  int res6 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:gluBuild1DMipmaps",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild1DMipmaps" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild1DMipmaps" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild1DMipmaps" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild1DMipmaps" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild1DMipmaps" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gluBuild1DMipmaps" "', argument " "6"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild1DMipmaps(arg1,arg2,arg3,arg4,arg5,(void const *)arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild2DMipmapLevels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  GLint arg7 ;
+  GLint arg8 ;
+  GLint arg9 ;
+  void *arg10 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  unsigned long val5 ;
+  int ecode5 = 0 ;
+  unsigned long val6 ;
+  int ecode6 = 0 ;
+  long val7 ;
+  int ecode7 = 0 ;
+  long val8 ;
+  int ecode8 = 0 ;
+  long val9 ;
+  int ecode9 = 0 ;
+  int res10 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:gluBuild2DMipmapLevels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild2DMipmapLevels" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild2DMipmapLevels" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild2DMipmapLevels" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild2DMipmapLevels" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild2DMipmapLevels" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluBuild2DMipmapLevels" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  ecode7 = SWIG_AsVal_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluBuild2DMipmapLevels" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  ecode8 = SWIG_AsVal_long(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluBuild2DMipmapLevels" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  ecode9 = SWIG_AsVal_long(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "gluBuild2DMipmapLevels" "', argument " "9"" of type '" "GLint""'");
+  } 
+  arg9 = (GLint)(val9);
+  res10 = SWIG_ConvertPtr(obj9,SWIG_as_voidptrptr(&arg10), 0, 0);
+  if (!SWIG_IsOK(res10)) {
+    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "gluBuild2DMipmapLevels" "', argument " "10"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild2DMipmapLevels(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(void const *)arg10);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild2DMipmaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLenum arg5 ;
+  GLenum arg6 ;
+  void *arg7 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  unsigned long val5 ;
+  int ecode5 = 0 ;
+  unsigned long val6 ;
+  int ecode6 = 0 ;
+  int res7 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:gluBuild2DMipmaps",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild2DMipmaps" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild2DMipmaps" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild2DMipmaps" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild2DMipmaps" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild2DMipmaps" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluBuild2DMipmaps" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7), 0, 0);
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "gluBuild2DMipmaps" "', argument " "7"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild2DMipmaps(arg1,arg2,arg3,arg4,arg5,arg6,(void const *)arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild3DMipmapLevels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLenum arg6 ;
+  GLenum arg7 ;
+  GLint arg8 ;
+  GLint arg9 ;
+  GLint arg10 ;
+  void *arg11 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  unsigned long val6 ;
+  int ecode6 = 0 ;
+  unsigned long val7 ;
+  int ecode7 = 0 ;
+  long val8 ;
+  int ecode8 = 0 ;
+  long val9 ;
+  int ecode9 = 0 ;
+  long val10 ;
+  int ecode10 = 0 ;
+  int res11 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:gluBuild3DMipmapLevels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild3DMipmapLevels" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild3DMipmapLevels" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild3DMipmapLevels" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild3DMipmapLevels" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild3DMipmapLevels" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluBuild3DMipmapLevels" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluBuild3DMipmapLevels" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  ecode8 = SWIG_AsVal_long(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluBuild3DMipmapLevels" "', argument " "8"" of type '" "GLint""'");
+  } 
+  arg8 = (GLint)(val8);
+  ecode9 = SWIG_AsVal_long(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "gluBuild3DMipmapLevels" "', argument " "9"" of type '" "GLint""'");
+  } 
+  arg9 = (GLint)(val9);
+  ecode10 = SWIG_AsVal_long(obj9, &val10);
+  if (!SWIG_IsOK(ecode10)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "gluBuild3DMipmapLevels" "', argument " "10"" of type '" "GLint""'");
+  } 
+  arg10 = (GLint)(val10);
+  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
+  if (!SWIG_IsOK(res11)) {
+    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "gluBuild3DMipmapLevels" "', argument " "11"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild3DMipmapLevels(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(void const *)arg11);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluBuild3DMipmaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLint arg2 ;
+  GLsizei arg3 ;
+  GLsizei arg4 ;
+  GLsizei arg5 ;
+  GLenum arg6 ;
+  GLenum arg7 ;
+  void *arg8 = (void *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  unsigned long val6 ;
+  int ecode6 = 0 ;
+  unsigned long val7 ;
+  int ecode7 = 0 ;
+  int res8 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:gluBuild3DMipmaps",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluBuild3DMipmaps" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluBuild3DMipmaps" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluBuild3DMipmaps" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluBuild3DMipmaps" "', argument " "4"" of type '" "GLsizei""'");
+  } 
+  arg4 = (GLsizei)(val4);
+  ecode5 = SWIG_AsVal_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluBuild3DMipmaps" "', argument " "5"" of type '" "GLsizei""'");
+  } 
+  arg5 = (GLsizei)(val5);
+  ecode6 = SWIG_AsVal_unsigned_SS_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluBuild3DMipmaps" "', argument " "6"" of type '" "GLenum""'");
+  } 
+  arg6 = (GLenum)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluBuild3DMipmaps" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
+  if (!SWIG_IsOK(res8)) {
+    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "gluBuild3DMipmaps" "', argument " "8"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluBuild3DMipmaps(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(void const *)arg8);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluCheckExtension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 = (GLubyte *) 0 ;
+  GLubyte *arg2 = (GLubyte *) 0 ;
+  GLboolean result;
+  PyArrayObject *array1 ;
+  PyArrayObject *array2 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluCheckExtension",&obj0,&obj1)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 0);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLubyte", 0);
+        if (! array2) return NULL;
+        arg2 = (GLubyte *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLboolean)gluCheckExtension((unsigned char const *)arg1,(unsigned char const *)arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluCylinder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLint arg5 ;
+  GLint arg6 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  long val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:gluCylinder",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluCylinder" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluCylinder" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluCylinder" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluCylinder" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluCylinder" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluCylinder" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluCylinder(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluDeleteNurbsRenderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluDeleteNurbsRenderer",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluDeleteNurbsRenderer" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluDeleteNurbsRenderer(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluDeleteQuadric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluDeleteQuadric",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluDeleteQuadric" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluDeleteQuadric(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluDeleteTess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluDeleteTess",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluDeleteTess" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluDeleteTess(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:gluDisk",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluDisk" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluDisk" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluDisk" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluDisk" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluDisk" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluDisk(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluEndCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluEndCurve",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluEndCurve" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluEndCurve(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluEndPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluEndPolygon",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluEndPolygon" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluEndPolygon(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluEndSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluEndSurface",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluEndSurface" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluEndSurface(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluEndTrim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluEndTrim",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluEndTrim" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluEndTrim(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluGetNurbsProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLenum arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluGetNurbsProperty",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluGetNurbsProperty" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluGetNurbsProperty" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluGetNurbsProperty(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluGetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLubyte *result = 0 ;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluGetString",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluGetString" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLubyte *)gluGetString(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluGetTessProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLenum arg2 ;
+  GLdouble *arg3 = (GLdouble *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluGetTessProperty",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluGetTessProperty" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluGetTessProperty" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluGetTessProperty(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluLoadSamplingMatrices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLfloat *arg2 = (GLfloat *) 0 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  GLint *arg4 = (GLint *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyArrayObject *array2 ;
+  PyArrayObject *array3 ;
+  PyArrayObject *array4 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:gluLoadSamplingMatrices",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluLoadSamplingMatrices" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj1))
+      {
+        int buffer_len;
+        array2 = NULL;
+        if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+        return NULL;
+        if (! arg2) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj1, &array2, "GLfloat", 0);
+        if (! array2) return NULL;
+        arg2 = (GLfloat *)array2->data;
+      }
+      /****
+          if (array2)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array2)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array2 = NULL;
+      if (PyObject_AsReadBuffer( obj1, (const void**)&arg2, &buffer_len))
+      return NULL;
+      if (! arg2) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj2))
+      {
+        int buffer_len;
+        array3 = NULL;
+        if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+        return NULL;
+        if (! arg3) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj2, &array3, "GLfloat", 0);
+        if (! array3) return NULL;
+        arg3 = (GLfloat *)array3->data;
+      }
+      /****
+          if (array3)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array3)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array3 = NULL;
+      if (PyObject_AsReadBuffer( obj2, (const void**)&arg3, &buffer_len))
+      return NULL;
+      if (! arg3) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj3))
+      {
+        int buffer_len;
+        array4 = NULL;
+        if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+        return NULL;
+        if (! arg4) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj3, &array4, "GLint", 0);
+        if (! array4) return NULL;
+        arg4 = (GLint *)array4->data;
+      }
+      /****
+          if (array4)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array4)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array4 = NULL;
+      if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+      return NULL;
+      if (! arg4) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluLoadSamplingMatrices(arg1,(float const *)arg2,(float const *)arg3,(long const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array2)
+    {
+      Py_DECREF(array2);
+    }
+  }
+  {
+    if (array3)
+    {
+      Py_DECREF(array3);
+    }
+  }
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluLookAt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble arg5 ;
+  GLdouble arg6 ;
+  GLdouble arg7 ;
+  GLdouble arg8 ;
+  GLdouble arg9 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  double val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  double val7 ;
+  int ecode7 = 0 ;
+  double val8 ;
+  int ecode8 = 0 ;
+  double val9 ;
+  int ecode9 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:gluLookAt",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluLookAt" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluLookAt" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluLookAt" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluLookAt" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  ecode5 = SWIG_AsVal_double(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluLookAt" "', argument " "5"" of type '" "GLdouble""'");
+  } 
+  arg5 = (GLdouble)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluLookAt" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  ecode7 = SWIG_AsVal_double(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluLookAt" "', argument " "7"" of type '" "GLdouble""'");
+  } 
+  arg7 = (GLdouble)(val7);
+  ecode8 = SWIG_AsVal_double(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluLookAt" "', argument " "8"" of type '" "GLdouble""'");
+  } 
+  arg8 = (GLdouble)(val8);
+  ecode9 = SWIG_AsVal_double(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "gluLookAt" "', argument " "9"" of type '" "GLdouble""'");
+  } 
+  arg9 = (GLdouble)(val9);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluLookAt(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNewNurbsRenderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":gluNewNurbsRenderer")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLUnurbs *)gluNewNurbsRenderer();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNewQuadric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":gluNewQuadric")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLUquadric *)gluNewQuadric();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GLUquadric, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNewTess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":gluNewTess")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLUtesselator *)gluNewTess();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNextContour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLenum arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluNextContour",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNextContour" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNextContour" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNextContour(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCallback__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLenum arg2 ;
+  _GLUfuncptr arg3 = (_GLUfuncptr) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluNurbsCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsCallback" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNurbsCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f___void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluNurbsCallback" "', argument " "3"" of type '" "_GLUfuncptr""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCallback(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[4];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = (int)PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 3); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUnurbs, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f_unsigned_long__void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluNurbsCallback__SWIG_0(self, args);
+        }
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUnurbs, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f___void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluNurbsCallback__SWIG_1(self, args);
+        }
+      }
+    }
+  }
+  
+fail:
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'gluNurbsCallback'.\n  Possible C/C++ prototypes are:\n""    gluNurbsCallback(GLUnurbs *,GLenum,void_GLenum_f)\n""    gluNurbsCallback(GLUnurbs *,GLenum,_GLUfuncptr)\n");
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCallbackData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLvoid *arg2 = (GLvoid *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluNurbsCallbackData",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsCallbackData" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsCallbackData(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCallbackDataEXT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLvoid *arg2 = (GLvoid *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluNurbsCallbackDataEXT",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsCallbackDataEXT" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsCallbackDataEXT(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLint arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  GLint arg4 ;
+  GLfloat *arg5 = (GLfloat *) 0 ;
+  GLint arg6 ;
+  GLenum arg7 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val6 ;
+  int ecode6 = 0 ;
+  unsigned long val7 ;
+  int ecode7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:gluNurbsCurve",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsCurve" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNurbsCurve" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluNurbsCurve" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode6 = SWIG_AsVal_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluNurbsCurve" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_unsigned_SS_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluNurbsCurve" "', argument " "7"" of type '" "GLenum""'");
+  } 
+  arg7 = (GLenum)(val7);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsCurve(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLenum arg2 ;
+  GLfloat arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluNurbsProperty",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsProperty" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNurbsProperty" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluNurbsProperty" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsProperty(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluNurbsSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLint arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  GLint arg4 ;
+  GLfloat *arg5 = (GLfloat *) 0 ;
+  GLint arg6 ;
+  GLint arg7 ;
+  GLfloat *arg8 = (GLfloat *) 0 ;
+  GLint arg9 ;
+  GLint arg10 ;
+  GLenum arg11 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val6 ;
+  int ecode6 = 0 ;
+  long val7 ;
+  int ecode7 = 0 ;
+  long val9 ;
+  int ecode9 = 0 ;
+  long val10 ;
+  int ecode10 = 0 ;
+  unsigned long val11 ;
+  int ecode11 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:gluNurbsSurface",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluNurbsSurface" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluNurbsSurface" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluNurbsSurface" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj4, (void**)&arg5, &buffer_len))
+    return NULL;
+    if (! arg5) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode6 = SWIG_AsVal_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluNurbsSurface" "', argument " "6"" of type '" "GLint""'");
+  } 
+  arg6 = (GLint)(val6);
+  ecode7 = SWIG_AsVal_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluNurbsSurface" "', argument " "7"" of type '" "GLint""'");
+  } 
+  arg7 = (GLint)(val7);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj7, (void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode9 = SWIG_AsVal_long(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "gluNurbsSurface" "', argument " "9"" of type '" "GLint""'");
+  } 
+  arg9 = (GLint)(val9);
+  ecode10 = SWIG_AsVal_long(obj9, &val10);
+  if (!SWIG_IsOK(ecode10)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "gluNurbsSurface" "', argument " "10"" of type '" "GLint""'");
+  } 
+  arg10 = (GLint)(val10);
+  ecode11 = SWIG_AsVal_unsigned_SS_long(obj10, &val11);
+  if (!SWIG_IsOK(ecode11)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "gluNurbsSurface" "', argument " "11"" of type '" "GLenum""'");
+  } 
+  arg11 = (GLenum)(val11);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluNurbsSurface(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluOrtho2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:gluOrtho2D",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluOrtho2D" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluOrtho2D" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluOrtho2D" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluOrtho2D" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluOrtho2D(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluPartialDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLint arg5 ;
+  GLdouble arg6 ;
+  GLdouble arg7 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  double val6 ;
+  int ecode6 = 0 ;
+  double val7 ;
+  int ecode7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:gluPartialDisk",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluPartialDisk" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluPartialDisk" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluPartialDisk" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluPartialDisk" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluPartialDisk" "', argument " "5"" of type '" "GLint""'");
+  } 
+  arg5 = (GLint)(val5);
+  ecode6 = SWIG_AsVal_double(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluPartialDisk" "', argument " "6"" of type '" "GLdouble""'");
+  } 
+  arg6 = (GLdouble)(val6);
+  ecode7 = SWIG_AsVal_double(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluPartialDisk" "', argument " "7"" of type '" "GLdouble""'");
+  } 
+  arg7 = (GLdouble)(val7);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluPartialDisk(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:gluPerspective",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluPerspective" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluPerspective" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluPerspective" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluPerspective" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluPerspective(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluPickMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLint *arg5 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyArrayObject *array5 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:gluPickMatrix",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluPickMatrix" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluPickMatrix" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluPickMatrix" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluPickMatrix" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj4))
+      {
+        int buffer_len;
+        array5 = NULL;
+        if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+        return NULL;
+        if (! arg5) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj4, &array5, "GLint", 4);
+        if (! array5) return NULL;
+        arg5 = (GLint *)array5->data;
+      }
+      /****
+          if (array5)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array5)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array5 = NULL;
+      if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+      return NULL;
+      if (! arg5) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluPickMatrix(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluProject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble *arg4 ;
+  GLdouble *arg5 ;
+  GLint *arg6 ;
+  GLdouble *arg7 = (GLdouble *) 0 ;
+  GLdouble *arg8 = (GLdouble *) 0 ;
+  GLdouble *arg9 = (GLdouble *) 0 ;
+  GLint result;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyArrayObject *array4 ;
+  PyArrayObject *array5 ;
+  PyArrayObject *array6 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:gluProject",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluProject" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluProject" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluProject" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj3))
+      {
+        int buffer_len;
+        array4 = NULL;
+        if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+        return NULL;
+        if (! arg4) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj3, &array4, "GLdouble", 16);
+        if (! array4) return NULL;
+        arg4 = (GLdouble *)array4->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array4 = NULL;
+      if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+      return NULL;
+      if (! arg4) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj4))
+      {
+        int buffer_len;
+        array5 = NULL;
+        if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+        return NULL;
+        if (! arg5) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj4, &array5, "GLdouble", 16);
+        if (! array5) return NULL;
+        arg5 = (GLdouble *)array5->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array5 = NULL;
+      if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+      return NULL;
+      if (! arg5) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj5))
+      {
+        int buffer_len;
+        array6 = NULL;
+        if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+        return NULL;
+        if (! arg6) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj5, &array6, "GLint", 4);
+        if (! array6) return NULL;
+        arg6 = (GLint *)array6->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array6 = NULL;
+      if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+      return NULL;
+      if (! arg6) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj6, (void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj7, (void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj8, (void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluProject(arg1,arg2,arg3,(double const (*))arg4,(double const (*))arg5,(long const (*))arg6,arg7,arg8,arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluPwlCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUnurbs *arg1 = (GLUnurbs *) 0 ;
+  GLint arg2 ;
+  GLfloat *arg3 = (GLfloat *) 0 ;
+  GLint arg4 ;
+  GLenum arg5 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  unsigned long val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:gluPwlCurve",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUnurbs, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluPwlCurve" "', argument " "1"" of type '" "GLUnurbs *""'"); 
+  }
+  arg1 = (GLUnurbs *)(argp1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluPwlCurve" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluPwlCurve" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  ecode5 = SWIG_AsVal_unsigned_SS_long(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gluPwlCurve" "', argument " "5"" of type '" "GLenum""'");
+  } 
+  arg5 = (GLenum)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluPwlCurve(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricCallback__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLenum arg2 ;
+  _GLUfuncptr arg3 = (_GLUfuncptr) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluQuadricCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricCallback" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f___void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluQuadricCallback" "', argument " "3"" of type '" "_GLUfuncptr""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricCallback(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[4];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = (int)PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 3); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUquadric, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f_unsigned_long__void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluQuadricCallback__SWIG_0(self, args);
+        }
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUquadric, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f___void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluQuadricCallback__SWIG_1(self, args);
+        }
+      }
+    }
+  }
+  
+fail:
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'gluQuadricCallback'.\n  Possible C/C++ prototypes are:\n""    gluQuadricCallback(GLUquadric *,GLenum,void_GLenum_f)\n""    gluQuadricCallback(GLUquadric *,GLenum,_GLUfuncptr)\n");
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricDrawStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLenum arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluQuadricDrawStyle",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricDrawStyle" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricDrawStyle" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricDrawStyle(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricNormals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLenum arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluQuadricNormals",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricNormals" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricNormals" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricNormals(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLenum arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluQuadricOrientation",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricOrientation" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricOrientation" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricOrientation(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluQuadricTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLboolean arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned char val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluQuadricTexture",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluQuadricTexture" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluQuadricTexture" "', argument " "2"" of type '" "GLboolean""'");
+  } 
+  arg2 = (GLboolean)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluQuadricTexture(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluScaleImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLenum arg1 ;
+  GLsizei arg2 ;
+  GLsizei arg3 ;
+  GLenum arg4 ;
+  void *arg5 = (void *) 0 ;
+  GLsizei arg6 ;
+  GLsizei arg7 ;
+  GLenum arg8 ;
+  GLvoid *arg9 = (GLvoid *) 0 ;
+  GLint result;
+  unsigned long val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  unsigned long val4 ;
+  int ecode4 = 0 ;
+  int res5 ;
+  long val6 ;
+  int ecode6 = 0 ;
+  long val7 ;
+  int ecode7 = 0 ;
+  unsigned long val8 ;
+  int ecode8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:gluScaleImage",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluScaleImage" "', argument " "1"" of type '" "GLenum""'");
+  } 
+  arg1 = (GLenum)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluScaleImage" "', argument " "2"" of type '" "GLsizei""'");
+  } 
+  arg2 = (GLsizei)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluScaleImage" "', argument " "3"" of type '" "GLsizei""'");
+  } 
+  arg3 = (GLsizei)(val3);
+  ecode4 = SWIG_AsVal_unsigned_SS_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluScaleImage" "', argument " "4"" of type '" "GLenum""'");
+  } 
+  arg4 = (GLenum)(val4);
+  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gluScaleImage" "', argument " "5"" of type '" "void const *""'"); 
+  }
+  ecode6 = SWIG_AsVal_long(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "gluScaleImage" "', argument " "6"" of type '" "GLsizei""'");
+  } 
+  arg6 = (GLsizei)(val6);
+  ecode7 = SWIG_AsVal_long(obj6, &val7);
+  if (!SWIG_IsOK(ecode7)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gluScaleImage" "', argument " "7"" of type '" "GLsizei""'");
+  } 
+  arg7 = (GLsizei)(val7);
+  ecode8 = SWIG_AsVal_unsigned_SS_long(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluScaleImage" "', argument " "8"" of type '" "GLenum""'");
+  } 
+  arg8 = (GLenum)(val8);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj8, (void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluScaleImage(arg1,arg2,arg3,arg4,(void const *)arg5,arg6,arg7,arg8,arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluSphere(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUquadric *arg1 = (GLUquadric *) 0 ;
+  GLdouble arg2 ;
+  GLint arg3 ;
+  GLint arg4 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:gluSphere",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUquadric, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluSphere" "', argument " "1"" of type '" "GLUquadric *""'"); 
+  }
+  arg1 = (GLUquadric *)(argp1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluSphere" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluSphere" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluSphere" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluSphere(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessBeginContour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluTessBeginContour",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessBeginContour" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessBeginContour(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessBeginPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLvoid *arg2 = (GLvoid *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:gluTessBeginPolygon",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessBeginPolygon" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessBeginPolygon(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessCallback__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLenum arg2 ;
+  _GLUfuncptr arg3 = (_GLUfuncptr) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluTessCallback",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessCallback" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluTessCallback" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  {
+    int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f___void);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gluTessCallback" "', argument " "3"" of type '" "_GLUfuncptr""'"); 
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessCallback(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessCallback(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[4];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = (int)PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 3); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUtesselator, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f_unsigned_long__void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluTessCallback__SWIG_0(self, args);
+        }
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GLUtesselator, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        void *ptr = 0;
+        int res = SWIG_ConvertFunctionPtr(argv[2], &ptr, SWIGTYPE_p_f___void);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_gluTessCallback__SWIG_1(self, args);
+        }
+      }
+    }
+  }
+  
+fail:
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'gluTessCallback'.\n  Possible C/C++ prototypes are:\n""    gluTessCallback(GLUtesselator *,GLenum,void_GLenum_f)\n""    gluTessCallback(GLUtesselator *,GLenum,_GLUfuncptr)\n");
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessEndContour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluTessEndContour",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessEndContour" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessEndContour(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessEndPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:gluTessEndPolygon",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessEndPolygon" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessEndPolygon(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:gluTessNormal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessNormal" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluTessNormal" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluTessNormal" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluTessNormal" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessNormal(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLenum arg2 ;
+  GLdouble arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluTessProperty",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessProperty" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluTessProperty" "', argument " "2"" of type '" "GLenum""'");
+  } 
+  arg2 = (GLenum)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluTessProperty" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessProperty(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluTessVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLUtesselator *arg1 = (GLUtesselator *) 0 ;
+  GLdouble *arg2 = (GLdouble *) 0 ;
+  GLvoid *arg3 = (GLvoid *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:gluTessVertex",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLUtesselator, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gluTessVertex" "', argument " "1"" of type '" "GLUtesselator *""'"); 
+  }
+  arg1 = (GLUtesselator *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    gluTessVertex(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluUnProject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble *arg4 ;
+  GLdouble *arg5 ;
+  GLint *arg6 ;
+  GLdouble *arg7 = (GLdouble *) 0 ;
+  GLdouble *arg8 = (GLdouble *) 0 ;
+  GLdouble *arg9 = (GLdouble *) 0 ;
+  GLint result;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  PyArrayObject *array4 ;
+  PyArrayObject *array5 ;
+  PyArrayObject *array6 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:gluUnProject",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluUnProject" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluUnProject" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluUnProject" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj3))
+      {
+        int buffer_len;
+        array4 = NULL;
+        if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+        return NULL;
+        if (! arg4) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj3, &array4, "GLdouble", 16);
+        if (! array4) return NULL;
+        arg4 = (GLdouble *)array4->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array4 = NULL;
+      if (PyObject_AsReadBuffer( obj3, (const void**)&arg4, &buffer_len))
+      return NULL;
+      if (! arg4) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj4))
+      {
+        int buffer_len;
+        array5 = NULL;
+        if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+        return NULL;
+        if (! arg5) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj4, &array5, "GLdouble", 16);
+        if (! array5) return NULL;
+        arg5 = (GLdouble *)array5->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array5 = NULL;
+      if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+      return NULL;
+      if (! arg5) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj5))
+      {
+        int buffer_len;
+        array6 = NULL;
+        if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+        return NULL;
+        if (! arg6) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj5, &array6, "GLint", 4);
+        if (! array6) return NULL;
+        arg6 = (GLint *)array6->data;
+      }
+      
+    }
+    else
+    {
+      int buffer_len;
+      array6 = NULL;
+      if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+      return NULL;
+      if (! arg6) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj6, (void**)&arg7, &buffer_len))
+    return NULL;
+    if (! arg7) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj7, (void**)&arg8, &buffer_len))
+    return NULL;
+    if (! arg8) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj8, (void**)&arg9, &buffer_len))
+    return NULL;
+    if (! arg9) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluUnProject(arg1,arg2,arg3,(double const (*))arg4,(double const (*))arg5,(long const (*))arg6,arg7,arg8,arg9);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array4)
+    {
+      Py_DECREF(array4);
+    }
+  }
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_gluUnProject4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLdouble arg4 ;
+  GLdouble *arg5 = (GLdouble *) 0 ;
+  GLdouble *arg6 = (GLdouble *) 0 ;
+  GLint *arg7 = (GLint *) 0 ;
+  GLdouble arg8 ;
+  GLdouble arg9 ;
+  GLdouble *arg10 = (GLdouble *) 0 ;
+  GLdouble *arg11 = (GLdouble *) 0 ;
+  GLdouble *arg12 = (GLdouble *) 0 ;
+  GLdouble *arg13 = (GLdouble *) 0 ;
+  GLint result;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  double val4 ;
+  int ecode4 = 0 ;
+  PyArrayObject *array5 ;
+  PyArrayObject *array6 ;
+  PyArrayObject *array7 ;
+  double val8 ;
+  int ecode8 = 0 ;
+  double val9 ;
+  int ecode9 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  PyObject * obj11 = 0 ;
+  PyObject * obj12 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:gluUnProject4",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gluUnProject4" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gluUnProject4" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gluUnProject4" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_double(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gluUnProject4" "', argument " "4"" of type '" "GLdouble""'");
+  } 
+  arg4 = (GLdouble)(val4);
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj4))
+      {
+        int buffer_len;
+        array5 = NULL;
+        if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+        return NULL;
+        if (! arg5) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj4, &array5, "GLdouble", 0);
+        if (! array5) return NULL;
+        arg5 = (GLdouble *)array5->data;
+      }
+      /****
+          if (array5)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array5)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array5 = NULL;
+      if (PyObject_AsReadBuffer( obj4, (const void**)&arg5, &buffer_len))
+      return NULL;
+      if (! arg5) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj5))
+      {
+        int buffer_len;
+        array6 = NULL;
+        if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+        return NULL;
+        if (! arg6) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj5, &array6, "GLdouble", 0);
+        if (! array6) return NULL;
+        arg6 = (GLdouble *)array6->data;
+      }
+      /****
+          if (array6)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array6)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array6 = NULL;
+      if (PyObject_AsReadBuffer( obj5, (const void**)&arg6, &buffer_len))
+      return NULL;
+      if (! arg6) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj6))
+      {
+        int buffer_len;
+        array7 = NULL;
+        if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+        return NULL;
+        if (! arg7) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj6, &array7, "GLint", 0);
+        if (! array7) return NULL;
+        arg7 = (GLint *)array7->data;
+      }
+      /****
+          if (array7)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array7)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array7 = NULL;
+      if (PyObject_AsReadBuffer( obj6, (const void**)&arg7, &buffer_len))
+      return NULL;
+      if (! arg7) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  ecode8 = SWIG_AsVal_double(obj7, &val8);
+  if (!SWIG_IsOK(ecode8)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "gluUnProject4" "', argument " "8"" of type '" "GLdouble""'");
+  } 
+  arg8 = (GLdouble)(val8);
+  ecode9 = SWIG_AsVal_double(obj8, &val9);
+  if (!SWIG_IsOK(ecode9)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "gluUnProject4" "', argument " "9"" of type '" "GLdouble""'");
+  } 
+  arg9 = (GLdouble)(val9);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj9, (void**)&arg10, &buffer_len))
+    return NULL;
+    if (! arg10) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj10, (void**)&arg11, &buffer_len))
+    return NULL;
+    if (! arg11) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj11, (void**)&arg12, &buffer_len))
+    return NULL;
+    if (! arg12) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj12, (void**)&arg13, &buffer_len))
+    return NULL;
+    if (! arg13) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLint)gluUnProject4(arg1,arg2,arg3,arg4,(double const *)arg5,(double const *)arg6,(long const *)arg7,arg8,arg9,arg10,arg11,arg12,arg13);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_long((long)(result));
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  {
+    if (array7)
+    {
+      Py_DECREF(array7);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array5)
+    {
+      Py_DECREF(array5);
+    }
+  }
+  {
+    if (array6)
+    {
+      Py_DECREF(array6);
+    }
+  }
+  {
+    if (array7)
+    {
+      Py_DECREF(array7);
+    }
+  }
+  return NULL;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"gluErrorString", glu_error_string, METH_VARARGS, NULL},
+	 { (char *)"gluBeginCurve", _wrap_gluBeginCurve, METH_VARARGS, NULL},
+	 { (char *)"gluBeginPolygon", _wrap_gluBeginPolygon, METH_VARARGS, NULL},
+	 { (char *)"gluBeginSurface", _wrap_gluBeginSurface, METH_VARARGS, NULL},
+	 { (char *)"gluBeginTrim", _wrap_gluBeginTrim, METH_VARARGS, NULL},
+	 { (char *)"gluBuild1DMipmapLevels", _wrap_gluBuild1DMipmapLevels, METH_VARARGS, NULL},
+	 { (char *)"gluBuild1DMipmaps", _wrap_gluBuild1DMipmaps, METH_VARARGS, NULL},
+	 { (char *)"gluBuild2DMipmapLevels", _wrap_gluBuild2DMipmapLevels, METH_VARARGS, NULL},
+	 { (char *)"gluBuild2DMipmaps", _wrap_gluBuild2DMipmaps, METH_VARARGS, NULL},
+	 { (char *)"gluBuild3DMipmapLevels", _wrap_gluBuild3DMipmapLevels, METH_VARARGS, NULL},
+	 { (char *)"gluBuild3DMipmaps", _wrap_gluBuild3DMipmaps, METH_VARARGS, NULL},
+	 { (char *)"gluCheckExtension", _wrap_gluCheckExtension, METH_VARARGS, NULL},
+	 { (char *)"gluCylinder", _wrap_gluCylinder, METH_VARARGS, NULL},
+	 { (char *)"gluDeleteNurbsRenderer", _wrap_gluDeleteNurbsRenderer, METH_VARARGS, NULL},
+	 { (char *)"gluDeleteQuadric", _wrap_gluDeleteQuadric, METH_VARARGS, NULL},
+	 { (char *)"gluDeleteTess", _wrap_gluDeleteTess, METH_VARARGS, NULL},
+	 { (char *)"gluDisk", _wrap_gluDisk, METH_VARARGS, NULL},
+	 { (char *)"gluEndCurve", _wrap_gluEndCurve, METH_VARARGS, NULL},
+	 { (char *)"gluEndPolygon", _wrap_gluEndPolygon, METH_VARARGS, NULL},
+	 { (char *)"gluEndSurface", _wrap_gluEndSurface, METH_VARARGS, NULL},
+	 { (char *)"gluEndTrim", _wrap_gluEndTrim, METH_VARARGS, NULL},
+	 { (char *)"gluGetNurbsProperty", _wrap_gluGetNurbsProperty, METH_VARARGS, NULL},
+	 { (char *)"gluGetString", _wrap_gluGetString, METH_VARARGS, NULL},
+	 { (char *)"gluGetTessProperty", _wrap_gluGetTessProperty, METH_VARARGS, NULL},
+	 { (char *)"gluLoadSamplingMatrices", _wrap_gluLoadSamplingMatrices, METH_VARARGS, NULL},
+	 { (char *)"gluLookAt", _wrap_gluLookAt, METH_VARARGS, NULL},
+	 { (char *)"gluNewNurbsRenderer", _wrap_gluNewNurbsRenderer, METH_VARARGS, NULL},
+	 { (char *)"gluNewQuadric", _wrap_gluNewQuadric, METH_VARARGS, NULL},
+	 { (char *)"gluNewTess", _wrap_gluNewTess, METH_VARARGS, NULL},
+	 { (char *)"gluNextContour", _wrap_gluNextContour, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsCallback", _wrap_gluNurbsCallback, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsCallbackData", _wrap_gluNurbsCallbackData, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsCallbackDataEXT", _wrap_gluNurbsCallbackDataEXT, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsCurve", _wrap_gluNurbsCurve, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsProperty", _wrap_gluNurbsProperty, METH_VARARGS, NULL},
+	 { (char *)"gluNurbsSurface", _wrap_gluNurbsSurface, METH_VARARGS, NULL},
+	 { (char *)"gluOrtho2D", _wrap_gluOrtho2D, METH_VARARGS, NULL},
+	 { (char *)"gluPartialDisk", _wrap_gluPartialDisk, METH_VARARGS, NULL},
+	 { (char *)"gluPerspective", _wrap_gluPerspective, METH_VARARGS, NULL},
+	 { (char *)"gluPickMatrix", _wrap_gluPickMatrix, METH_VARARGS, NULL},
+	 { (char *)"gluProject", _wrap_gluProject, METH_VARARGS, NULL},
+	 { (char *)"gluPwlCurve", _wrap_gluPwlCurve, METH_VARARGS, NULL},
+	 { (char *)"gluQuadricCallback", _wrap_gluQuadricCallback, METH_VARARGS, NULL},
+	 { (char *)"gluQuadricDrawStyle", _wrap_gluQuadricDrawStyle, METH_VARARGS, NULL},
+	 { (char *)"gluQuadricNormals", _wrap_gluQuadricNormals, METH_VARARGS, NULL},
+	 { (char *)"gluQuadricOrientation", _wrap_gluQuadricOrientation, METH_VARARGS, NULL},
+	 { (char *)"gluQuadricTexture", _wrap_gluQuadricTexture, METH_VARARGS, NULL},
+	 { (char *)"gluScaleImage", _wrap_gluScaleImage, METH_VARARGS, NULL},
+	 { (char *)"gluSphere", _wrap_gluSphere, METH_VARARGS, NULL},
+	 { (char *)"gluTessBeginContour", _wrap_gluTessBeginContour, METH_VARARGS, NULL},
+	 { (char *)"gluTessBeginPolygon", _wrap_gluTessBeginPolygon, METH_VARARGS, NULL},
+	 { (char *)"gluTessCallback", _wrap_gluTessCallback, METH_VARARGS, NULL},
+	 { (char *)"gluTessEndContour", _wrap_gluTessEndContour, METH_VARARGS, NULL},
+	 { (char *)"gluTessEndPolygon", _wrap_gluTessEndPolygon, METH_VARARGS, NULL},
+	 { (char *)"gluTessNormal", _wrap_gluTessNormal, METH_VARARGS, NULL},
+	 { (char *)"gluTessProperty", _wrap_gluTessProperty, METH_VARARGS, NULL},
+	 { (char *)"gluTessVertex", _wrap_gluTessVertex, METH_VARARGS, NULL},
+	 { (char *)"gluUnProject", _wrap_gluUnProject, METH_VARARGS, NULL},
+	 { (char *)"gluUnProject4", _wrap_gluUnProject4, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_GLUnurbs = {"_p_GLUnurbs", "GLUnurbsObj *|struct GLUnurbs *|GLUnurbs *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_GLUquadric = {"_p_GLUquadric", "GLUquadricObj *|struct GLUquadric *|GLUquadric *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_GLUtesselator = {"_p_GLUtesselator", "struct GLUtesselator *|GLUtesselator *|GLUtesselatorObj *|GLUtriangulatorObj *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_double = {"_p_double", "double *|GLclampd *|GLdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f___void = {"_p_f___void", "void (*)()|_GLUfuncptr", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_unsigned_long__void = {"_p_f_unsigned_long__void", "void_GLenum_f|void (*)(unsigned long)", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_float = {"_p_float", "GLclampf *|float *|GLfloat *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "GLsizei *|long *|GLint *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_short = {"_p_short", "short *|GLshort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|GLbyte *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|GLubyte *|GLboolean *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "GLuint *|unsigned long *|GLenum *|GLbitfield *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|GLushort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_void = {"_p_void", "void *|GLvoid *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_GLUnurbs,
+  &_swigt__p_GLUquadric,
+  &_swigt__p_GLUtesselator,
+  &_swigt__p_char,
+  &_swigt__p_double,
+  &_swigt__p_f___void,
+  &_swigt__p_f_unsigned_long__void,
+  &_swigt__p_float,
+  &_swigt__p_long,
+  &_swigt__p_short,
+  &_swigt__p_signed_char,
+  &_swigt__p_unsigned_char,
+  &_swigt__p_unsigned_long,
+  &_swigt__p_unsigned_short,
+  &_swigt__p_void,
+};
+
+static swig_cast_info _swigc__p_GLUnurbs[] = {  {&_swigt__p_GLUnurbs, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_GLUquadric[] = {  {&_swigt__p_GLUquadric, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_GLUtesselator[] = {  {&_swigt__p_GLUtesselator, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f___void[] = {  {&_swigt__p_f___void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_unsigned_long__void[] = {  {&_swigt__p_f_unsigned_long__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_GLUnurbs,
+  _swigc__p_GLUquadric,
+  _swigc__p_GLUtesselator,
+  _swigc__p_char,
+  _swigc__p_double,
+  _swigc__p_f___void,
+  _swigc__p_f_unsigned_long__void,
+  _swigc__p_float,
+  _swigc__p_long,
+  _swigc__p_short,
+  _swigc__p_signed_char,
+  _swigc__p_unsigned_char,
+  _swigc__p_unsigned_long,
+  _swigc__p_unsigned_short,
+  _swigc__p_void,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+    return PyString_FromString("<Swig global variables>");
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar  *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", PyString_AsString(str));
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;  
+    if (!type_init) {
+      const PyTypeObject tmp
+      = {
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* Number of items in variable part (ob_size) */
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc)swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      varlink_type.ob_type = &PyType_Type;
+      type_init = 1;
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          size_t shift = (ci->ptype) - types;
+          swig_type_info *ty = types_initial[shift];
+          size_t ldoc = (c - methods[i].ml_doc);
+          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+          char *ndoc = (char*)malloc(ldoc + lptr + 10);
+          if (ndoc) {
+            char *buff = ndoc;
+            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+            if (ptr) {
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+SWIGEXPORT void SWIG_init(void) {
+  PyObject *m, *d;
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+  d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  
+  
+  import_array(); /* load the Numeric PyCObjects */
+  
+  PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"checkArgumentsInCWrapper",Swig_var_checkArgumentsInCWrapper_get, Swig_var_checkArgumentsInCWrapper_set);
+  
+  s_opengltk = PypImport_ModuleCobjAttr( "opengltk.extent._utillib",
+    "opengltk_export");
+  if (NOT s_opengltk) return;
+  s_opengltk->checkerror = 1;
+  
+  SWIG_Python_SetConstant(d, "GLU_EXT_object_space_tess",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_EXT_nurbs_tessellator",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_FALSE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "GLU_TRUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_VERSION_1_1",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_VERSION_1_2",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_VERSION_1_3",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLU_VERSION",SWIG_From_int((int)(100800)));
+  SWIG_Python_SetConstant(d, "GLU_EXTENSIONS",SWIG_From_int((int)(100801)));
+  SWIG_Python_SetConstant(d, "GLU_INVALID_ENUM",SWIG_From_int((int)(100900)));
+  SWIG_Python_SetConstant(d, "GLU_INVALID_VALUE",SWIG_From_int((int)(100901)));
+  SWIG_Python_SetConstant(d, "GLU_OUT_OF_MEMORY",SWIG_From_int((int)(100902)));
+  SWIG_Python_SetConstant(d, "GLU_INCOMPATIBLE_GL_VERSION",SWIG_From_int((int)(100903)));
+  SWIG_Python_SetConstant(d, "GLU_INVALID_OPERATION",SWIG_From_int((int)(100904)));
+  SWIG_Python_SetConstant(d, "GLU_OUTLINE_POLYGON",SWIG_From_int((int)(100240)));
+  SWIG_Python_SetConstant(d, "GLU_OUTLINE_PATCH",SWIG_From_int((int)(100241)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR",SWIG_From_int((int)(100103)));
+  SWIG_Python_SetConstant(d, "GLU_ERROR",SWIG_From_int((int)(100103)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_BEGIN",SWIG_From_int((int)(100164)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_BEGIN_EXT",SWIG_From_int((int)(100164)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_VERTEX",SWIG_From_int((int)(100165)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_VERTEX_EXT",SWIG_From_int((int)(100165)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_NORMAL",SWIG_From_int((int)(100166)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_NORMAL_EXT",SWIG_From_int((int)(100166)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_COLOR",SWIG_From_int((int)(100167)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_COLOR_EXT",SWIG_From_int((int)(100167)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TEXTURE_COORD",SWIG_From_int((int)(100168)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TEX_COORD_EXT",SWIG_From_int((int)(100168)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_END",SWIG_From_int((int)(100169)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_END_EXT",SWIG_From_int((int)(100169)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_BEGIN_DATA",SWIG_From_int((int)(100170)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_BEGIN_DATA_EXT",SWIG_From_int((int)(100170)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_VERTEX_DATA",SWIG_From_int((int)(100171)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_VERTEX_DATA_EXT",SWIG_From_int((int)(100171)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_NORMAL_DATA",SWIG_From_int((int)(100172)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_NORMAL_DATA_EXT",SWIG_From_int((int)(100172)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_COLOR_DATA",SWIG_From_int((int)(100173)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_COLOR_DATA_EXT",SWIG_From_int((int)(100173)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TEXTURE_COORD_DATA",SWIG_From_int((int)(100174)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TEX_COORD_DATA_EXT",SWIG_From_int((int)(100174)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_END_DATA",SWIG_From_int((int)(100175)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_END_DATA_EXT",SWIG_From_int((int)(100175)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR1",SWIG_From_int((int)(100251)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR2",SWIG_From_int((int)(100252)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR3",SWIG_From_int((int)(100253)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR4",SWIG_From_int((int)(100254)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR5",SWIG_From_int((int)(100255)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR6",SWIG_From_int((int)(100256)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR7",SWIG_From_int((int)(100257)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR8",SWIG_From_int((int)(100258)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR9",SWIG_From_int((int)(100259)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR10",SWIG_From_int((int)(100260)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR11",SWIG_From_int((int)(100261)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR12",SWIG_From_int((int)(100262)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR13",SWIG_From_int((int)(100263)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR14",SWIG_From_int((int)(100264)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR15",SWIG_From_int((int)(100265)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR16",SWIG_From_int((int)(100266)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR17",SWIG_From_int((int)(100267)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR18",SWIG_From_int((int)(100268)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR19",SWIG_From_int((int)(100269)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR20",SWIG_From_int((int)(100270)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR21",SWIG_From_int((int)(100271)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR22",SWIG_From_int((int)(100272)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR23",SWIG_From_int((int)(100273)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR24",SWIG_From_int((int)(100274)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR25",SWIG_From_int((int)(100275)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR26",SWIG_From_int((int)(100276)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR27",SWIG_From_int((int)(100277)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR28",SWIG_From_int((int)(100278)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR29",SWIG_From_int((int)(100279)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR30",SWIG_From_int((int)(100280)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR31",SWIG_From_int((int)(100281)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR32",SWIG_From_int((int)(100282)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR33",SWIG_From_int((int)(100283)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR34",SWIG_From_int((int)(100284)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR35",SWIG_From_int((int)(100285)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR36",SWIG_From_int((int)(100286)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_ERROR37",SWIG_From_int((int)(100287)));
+  SWIG_Python_SetConstant(d, "GLU_AUTO_LOAD_MATRIX",SWIG_From_int((int)(100200)));
+  SWIG_Python_SetConstant(d, "GLU_CULLING",SWIG_From_int((int)(100201)));
+  SWIG_Python_SetConstant(d, "GLU_SAMPLING_TOLERANCE",SWIG_From_int((int)(100203)));
+  SWIG_Python_SetConstant(d, "GLU_DISPLAY_MODE",SWIG_From_int((int)(100204)));
+  SWIG_Python_SetConstant(d, "GLU_PARAMETRIC_TOLERANCE",SWIG_From_int((int)(100202)));
+  SWIG_Python_SetConstant(d, "GLU_SAMPLING_METHOD",SWIG_From_int((int)(100205)));
+  SWIG_Python_SetConstant(d, "GLU_U_STEP",SWIG_From_int((int)(100206)));
+  SWIG_Python_SetConstant(d, "GLU_V_STEP",SWIG_From_int((int)(100207)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_MODE",SWIG_From_int((int)(100160)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_MODE_EXT",SWIG_From_int((int)(100160)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TESSELLATOR",SWIG_From_int((int)(100161)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_TESSELLATOR_EXT",SWIG_From_int((int)(100161)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_RENDERER",SWIG_From_int((int)(100162)));
+  SWIG_Python_SetConstant(d, "GLU_NURBS_RENDERER_EXT",SWIG_From_int((int)(100162)));
+  SWIG_Python_SetConstant(d, "GLU_OBJECT_PARAMETRIC_ERROR",SWIG_From_int((int)(100208)));
+  SWIG_Python_SetConstant(d, "GLU_OBJECT_PARAMETRIC_ERROR_EXT",SWIG_From_int((int)(100208)));
+  SWIG_Python_SetConstant(d, "GLU_OBJECT_PATH_LENGTH",SWIG_From_int((int)(100209)));
+  SWIG_Python_SetConstant(d, "GLU_OBJECT_PATH_LENGTH_EXT",SWIG_From_int((int)(100209)));
+  SWIG_Python_SetConstant(d, "GLU_PATH_LENGTH",SWIG_From_int((int)(100215)));
+  SWIG_Python_SetConstant(d, "GLU_PARAMETRIC_ERROR",SWIG_From_int((int)(100216)));
+  SWIG_Python_SetConstant(d, "GLU_DOMAIN_DISTANCE",SWIG_From_int((int)(100217)));
+  SWIG_Python_SetConstant(d, "GLU_MAP1_TRIM_2",SWIG_From_int((int)(100210)));
+  SWIG_Python_SetConstant(d, "GLU_MAP1_TRIM_3",SWIG_From_int((int)(100211)));
+  SWIG_Python_SetConstant(d, "GLU_POINT",SWIG_From_int((int)(100010)));
+  SWIG_Python_SetConstant(d, "GLU_LINE",SWIG_From_int((int)(100011)));
+  SWIG_Python_SetConstant(d, "GLU_FILL",SWIG_From_int((int)(100012)));
+  SWIG_Python_SetConstant(d, "GLU_SILHOUETTE",SWIG_From_int((int)(100013)));
+  SWIG_Python_SetConstant(d, "GLU_SMOOTH",SWIG_From_int((int)(100000)));
+  SWIG_Python_SetConstant(d, "GLU_FLAT",SWIG_From_int((int)(100001)));
+  SWIG_Python_SetConstant(d, "GLU_NONE",SWIG_From_int((int)(100002)));
+  SWIG_Python_SetConstant(d, "GLU_OUTSIDE",SWIG_From_int((int)(100020)));
+  SWIG_Python_SetConstant(d, "GLU_INSIDE",SWIG_From_int((int)(100021)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_BEGIN",SWIG_From_int((int)(100100)));
+  SWIG_Python_SetConstant(d, "GLU_BEGIN",SWIG_From_int((int)(100100)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_VERTEX",SWIG_From_int((int)(100101)));
+  SWIG_Python_SetConstant(d, "GLU_VERTEX",SWIG_From_int((int)(100101)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_END",SWIG_From_int((int)(100102)));
+  SWIG_Python_SetConstant(d, "GLU_END",SWIG_From_int((int)(100102)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR",SWIG_From_int((int)(100103)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_EDGE_FLAG",SWIG_From_int((int)(100104)));
+  SWIG_Python_SetConstant(d, "GLU_EDGE_FLAG",SWIG_From_int((int)(100104)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_COMBINE",SWIG_From_int((int)(100105)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_BEGIN_DATA",SWIG_From_int((int)(100106)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_VERTEX_DATA",SWIG_From_int((int)(100107)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_END_DATA",SWIG_From_int((int)(100108)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR_DATA",SWIG_From_int((int)(100109)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_EDGE_FLAG_DATA",SWIG_From_int((int)(100110)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_COMBINE_DATA",SWIG_From_int((int)(100111)));
+  SWIG_Python_SetConstant(d, "GLU_CW",SWIG_From_int((int)(100120)));
+  SWIG_Python_SetConstant(d, "GLU_CCW",SWIG_From_int((int)(100121)));
+  SWIG_Python_SetConstant(d, "GLU_INTERIOR",SWIG_From_int((int)(100122)));
+  SWIG_Python_SetConstant(d, "GLU_EXTERIOR",SWIG_From_int((int)(100123)));
+  SWIG_Python_SetConstant(d, "GLU_UNKNOWN",SWIG_From_int((int)(100124)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_RULE",SWIG_From_int((int)(100140)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_BOUNDARY_ONLY",SWIG_From_int((int)(100141)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_TOLERANCE",SWIG_From_int((int)(100142)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR1",SWIG_From_int((int)(100151)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR2",SWIG_From_int((int)(100152)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR3",SWIG_From_int((int)(100153)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR4",SWIG_From_int((int)(100154)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR5",SWIG_From_int((int)(100155)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR6",SWIG_From_int((int)(100156)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR7",SWIG_From_int((int)(100157)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_ERROR8",SWIG_From_int((int)(100158)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_MISSING_BEGIN_POLYGON",SWIG_From_int((int)(100151)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_MISSING_BEGIN_CONTOUR",SWIG_From_int((int)(100152)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_MISSING_END_POLYGON",SWIG_From_int((int)(100153)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_MISSING_END_CONTOUR",SWIG_From_int((int)(100154)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_COORD_TOO_LARGE",SWIG_From_int((int)(100155)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_NEED_COMBINE_",SWIG_From_int((int)(100156)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_ODD",SWIG_From_int((int)(100130)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_NONZERO",SWIG_From_int((int)(100131)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_POSITIVE",SWIG_From_int((int)(100132)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_NEGATIVE",SWIG_From_int((int)(100133)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_WINDING_ABS_GEQ_TWO",SWIG_From_int((int)(100134)));
+  SWIG_Python_SetConstant(d, "GLU_TESS_MAX_COORD",SWIG_From_double((double)(1.0e150)));
+}
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glx_i.h
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glx_i.h	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glx_i.h	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,457 @@
+/*
+ * Mesa 3-D graphics library
+ * Version:  6.5
+ * 
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef GLX_H
+#define GLX_H
+
+
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+# ifdef __cplusplus
+/* VMS Xlib.h gives problems with C++.
+ * this avoids a bunch of trivial warnings */
+#pragma message disable nosimpint
+#endif
+#endif
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#ifdef __VMS
+# ifdef __cplusplus
+#pragma message enable nosimpint
+#endif
+#endif
+#include <GL/gl.h>
+
+
+#if defined(USE_MGL_NAMESPACE)
+#include "glx_mangle.h"
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define GLX_VERSION_1_1		1
+#define GLX_VERSION_1_2		1
+#define GLX_VERSION_1_3		1
+#define GLX_VERSION_1_4		1
+
+#define GLX_EXTENSION_NAME   "GLX"
+
+
+
+/*
+ * Tokens for glXChooseVisual and glXGetConfig:
+ */
+#define GLX_USE_GL		1
+#define GLX_BUFFER_SIZE		2
+#define GLX_LEVEL		3
+#define GLX_RGBA		4
+#define GLX_DOUBLEBUFFER	5
+#define GLX_STEREO		6
+#define GLX_AUX_BUFFERS		7
+#define GLX_RED_SIZE		8
+#define GLX_GREEN_SIZE		9
+#define GLX_BLUE_SIZE		10
+#define GLX_ALPHA_SIZE		11
+#define GLX_DEPTH_SIZE		12
+#define GLX_STENCIL_SIZE	13
+#define GLX_ACCUM_RED_SIZE	14
+#define GLX_ACCUM_GREEN_SIZE	15
+#define GLX_ACCUM_BLUE_SIZE	16
+#define GLX_ACCUM_ALPHA_SIZE	17
+
+
+/*
+ * Error codes returned by glXGetConfig:
+ */
+#define GLX_BAD_SCREEN		1
+#define GLX_BAD_ATTRIBUTE	2
+#define GLX_NO_EXTENSION	3
+#define GLX_BAD_VISUAL		4
+#define GLX_BAD_CONTEXT		5
+#define GLX_BAD_VALUE       	6
+#define GLX_BAD_ENUM		7
+
+
+/*
+ * GLX 1.1 and later:
+ */
+#define GLX_VENDOR		1
+#define GLX_VERSION		2
+#define GLX_EXTENSIONS 		3
+
+
+/*
+ * GLX 1.3 and later:
+ */
+#define GLX_CONFIG_CAVEAT		0x20
+#define GLX_DONT_CARE			0xFFFFFFFF
+#define GLX_X_VISUAL_TYPE		0x22
+#define GLX_TRANSPARENT_TYPE		0x23
+#define GLX_TRANSPARENT_INDEX_VALUE	0x24
+#define GLX_TRANSPARENT_RED_VALUE	0x25
+#define GLX_TRANSPARENT_GREEN_VALUE	0x26
+#define GLX_TRANSPARENT_BLUE_VALUE	0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE	0x28
+#define GLX_WINDOW_BIT			0x00000001
+#define GLX_PIXMAP_BIT			0x00000002
+#define GLX_PBUFFER_BIT			0x00000004
+#define GLX_AUX_BUFFERS_BIT		0x00000010
+#define GLX_FRONT_LEFT_BUFFER_BIT	0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT	0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT	0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT	0x00000008
+#define GLX_DEPTH_BUFFER_BIT		0x00000020
+#define GLX_STENCIL_BUFFER_BIT		0x00000040
+#define GLX_ACCUM_BUFFER_BIT		0x00000080
+#define GLX_NONE			0x8000
+#define GLX_SLOW_CONFIG			0x8001
+#define GLX_TRUE_COLOR			0x8002
+#define GLX_DIRECT_COLOR		0x8003
+#define GLX_PSEUDO_COLOR		0x8004
+#define GLX_STATIC_COLOR		0x8005
+#define GLX_GRAY_SCALE			0x8006
+#define GLX_STATIC_GRAY			0x8007
+#define GLX_TRANSPARENT_RGB		0x8008
+#define GLX_TRANSPARENT_INDEX		0x8009
+#define GLX_VISUAL_ID			0x800B
+#define GLX_SCREEN			0x800C
+#define GLX_NON_CONFORMANT_CONFIG	0x800D
+#define GLX_DRAWABLE_TYPE		0x8010
+#define GLX_RENDER_TYPE			0x8011
+#define GLX_X_RENDERABLE		0x8012
+#define GLX_FBCONFIG_ID			0x8013
+#define GLX_RGBA_TYPE			0x8014
+#define GLX_COLOR_INDEX_TYPE		0x8015
+#define GLX_MAX_PBUFFER_WIDTH		0x8016
+#define GLX_MAX_PBUFFER_HEIGHT		0x8017
+#define GLX_MAX_PBUFFER_PIXELS		0x8018
+#define GLX_PRESERVED_CONTENTS		0x801B
+#define GLX_LARGEST_PBUFFER		0x801C
+#define GLX_WIDTH			0x801D
+#define GLX_HEIGHT			0x801E
+#define GLX_EVENT_MASK			0x801F
+#define GLX_DAMAGED			0x8020
+#define GLX_SAVED			0x8021
+#define GLX_WINDOW			0x8022
+#define GLX_PBUFFER			0x8023
+#define GLX_PBUFFER_HEIGHT              0x8040
+#define GLX_PBUFFER_WIDTH               0x8041
+#define GLX_RGBA_BIT			0x00000001
+#define GLX_COLOR_INDEX_BIT		0x00000002
+#define GLX_PBUFFER_CLOBBER_MASK	0x08000000
+
+
+/*
+ * GLX 1.4 and later:
+ */
+#define GLX_SAMPLE_BUFFERS              0x186a0 /*100000*/
+#define GLX_SAMPLES                     0x186a1 /*100001*/
+
+
+
+typedef struct __GLXcontextRec *GLXContext;
+typedef XID GLXPixmap;
+typedef XID GLXDrawable;
+/* GLX 1.3 and later */
+typedef struct __GLXFBConfigRec *GLXFBConfig;
+typedef XID GLXFBConfigID;
+typedef XID GLXContextID;
+typedef XID GLXWindow;
+typedef XID GLXPbuffer;
+XVisualInfo* glXChooseVisual( Display *dpy, int screen,
+				     int *attribList );
+GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
+				    GLXContext shareList, Bool direct );
+void glXDestroyContext( Display *dpy, GLXContext ctx );
+Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
+			    GLXContext ctx);
+void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
+			    unsigned long mask );
+void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
+GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
+				     Pixmap pixmap );
+void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
+Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
+Bool glXQueryVersion( Display *dpy, int *maj, int *min );
+Bool glXIsDirect( Display *dpy, GLXContext ctx );
+int glXGetConfig( Display *dpy, XVisualInfo *visual,
+			 int attrib, int *value );
+GLXContext glXGetCurrentContext( void );
+GLXDrawable glXGetCurrentDrawable( void );
+void glXWaitGL( void );
+void glXWaitX( void );
+void glXUseXFont( Font font, int first, int count, int list );
+
+
+
+/* GLX 1.1 and later */
+const char *glXQueryExtensionsString( Display *dpy, int screen );
+const char *glXQueryServerString( Display *dpy, int screen, int name );
+const char *glXGetClientString( Display *dpy, int name );
+
+
+/* GLX 1.2 and later */
+Display *glXGetCurrentDisplay( void );
+
+
+/* GLX 1.3 and later */
+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
+                                       const int *attribList, int *nitems );
+int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
+                                 int attribute, int *value );
+GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
+                                     int *nelements );
+XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
+                                              GLXFBConfig config );
+GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
+                                  Window win, const int *attribList );
+void glXDestroyWindow( Display *dpy, GLXWindow window );
+GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
+                                  Pixmap pixmap, const int *attribList );
+void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
+GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
+                                    const int *attribList );
+void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
+void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
+                              unsigned int *value );
+GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
+                                       int renderType, GLXContext shareList,
+                                       Bool direct );
+Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
+                                   GLXDrawable read, GLXContext ctx );
+GLXDrawable glXGetCurrentReadDrawable( void );
+int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
+                            int *value );
+void glXSelectEvent( Display *dpy, GLXDrawable drawable,
+                            unsigned long mask );
+void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
+                                 unsigned long *mask );
+
+
+/* GLX 1.4 and later */
+void (*glXGetProcAddress(const GLubyte *procname))( void );
+
+
+#ifndef GLX_GLXEXT_LEGACY
+
+#include <GL/glxext.h>
+
+#else
+
+
+
+/*
+ * ARB 2. GLX_ARB_get_proc_address
+ */
+#ifndef GLX_ARB_get_proc_address
+#define GLX_ARB_get_proc_address 1
+
+typedef void (*__GLXextFuncPtr)(void);
+__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
+
+#endif /* GLX_ARB_get_proc_address */
+
+
+
+#endif /* GLX_GLXEXT_LEGACY */
+
+
+/**
+ ** The following aren't in glxext.h yet.
+ **/
+
+
+/*
+ * ???. GLX_NV_vertex_array_range
+ */
+#ifndef GLX_NV_vertex_array_range
+#define GLX_NV_vertex_array_range
+void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+void glXFreeMemoryNV(GLvoid *pointer);
+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
+
+#endif /* GLX_NV_vertex_array_range */
+
+
+/*
+ * ???. GLX_MESA_allocate_memory
+ */ 
+#ifndef GLX_MESA_allocate_memory
+#define GLX_MESA_allocate_memory 1
+void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
+void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
+GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
+
+#endif /* GLX_MESA_allocate_memory */
+
+
+/*
+ * ARB ?. GLX_ARB_render_texture
+ * XXX This was never finalized!
+ */
+#ifndef GLX_ARB_render_texture
+#define GLX_ARB_render_texture 1
+Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
+Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
+Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
+
+#endif /* GLX_ARB_render_texture */
+
+
+/*
+ * Remove this when glxext.h is updated.
+ */
+#ifndef GLX_NV_float_buffer
+#define GLX_NV_float_buffer 1
+
+#define GLX_FLOAT_COMPONENTS_NV         0x20B0
+
+#endif /* GLX_NV_float_buffer */
+
+
+
+/*
+ * #?. GLX_MESA_swap_frame_usage
+ */
+#ifndef GLX_MESA_swap_frame_usage
+#define GLX_MESA_swap_frame_usage 1
+int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
+int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
+int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
+int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
+
+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
+
+#endif /* GLX_MESA_swap_frame_usage */
+
+
+
+/*
+ * #?. GLX_MESA_swap_control
+ */
+#ifndef GLX_MESA_swap_control
+#define GLX_MESA_swap_control 1
+int glXSwapIntervalMESA(unsigned int interval);
+int glXGetSwapIntervalMESA(void);
+
+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
+
+#endif /* GLX_MESA_swap_control */
+
+
+
+/*
+ * #?. GLX_EXT_texture_from_pixmap
+ * XXX not finished?
+ */
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_EXT_texture_from_pixmap 1
+
+#define GLX_BIND_TO_TEXTURE_RGB_EXT        0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT       0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT     0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT    0x20D3
+#define GLX_Y_INVERTED_EXT                 0x20D4
+
+#define GLX_TEXTURE_FORMAT_EXT             0x20D5
+#define GLX_TEXTURE_TARGET_EXT             0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT             0x20D7
+
+#define GLX_TEXTURE_FORMAT_NONE_EXT        0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT         0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT        0x20DA
+
+#define GLX_TEXTURE_1D_BIT_EXT             0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT             0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT      0x00000004
+
+#define GLX_TEXTURE_1D_EXT                 0x20DB
+#define GLX_TEXTURE_2D_EXT                 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT          0x20DD
+
+#define GLX_FRONT_LEFT_EXT                 0x20DE
+#define GLX_FRONT_RIGHT_EXT                0x20DF
+#define GLX_BACK_LEFT_EXT                  0x20E0
+#define GLX_BACK_RIGHT_EXT                 0x20E1
+#define GLX_FRONT_EXT                      GLX_FRONT_LEFT_EXT
+#define GLX_BACK_EXT                       GLX_BACK_LEFT_EXT
+#define GLX_AUX0_EXT                       0x20E2
+#define GLX_AUX1_EXT                       0x20E3 
+#define GLX_AUX2_EXT                       0x20E4 
+#define GLX_AUX3_EXT                       0x20E5 
+#define GLX_AUX4_EXT                       0x20E6 
+#define GLX_AUX5_EXT                       0x20E7 
+#define GLX_AUX6_EXT                       0x20E8
+#define GLX_AUX7_EXT                       0x20E9 
+#define GLX_AUX8_EXT                       0x20EA 
+#define GLX_AUX9_EXT                       0x20EB
+void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
+void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
+
+#endif /* GLX_EXT_texture_from_pixmap */
+
+
+
+
+/*** Should these go here, or in another header? */
+/*
+** GLX Events
+*/
+typedef struct {
+    int event_type;		/* GLX_DAMAGED or GLX_SAVED */
+    int draw_type;		/* GLX_WINDOW or GLX_PBUFFER */
+    unsigned long serial;	/* # of last request processed by server */
+    Bool send_event;		/* true if this came for SendEvent request */
+    Display *display;		/* display the event was read from */
+    GLXDrawable drawable;	/* XID of Drawable */
+    unsigned int buffer_mask;	/* mask indicating which buffers are affected */
+    unsigned int aux_buffer;	/* which aux buffer was affected */
+    int x, y;
+    int width, height;
+    int count;			/* if nonzero, at least this many more */
+} GLXPbufferClobberEvent;
+
+typedef union __GLXEvent {
+    GLXPbufferClobberEvent glxpbufferclobber;
+    long pad[24];
+} GLXEvent;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib.py
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib.py	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib.py	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,316 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.33
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _glxlib
+import new
+new_instancemethod = new.instancemethod
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'PySwigObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError,name
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+    _object = types.ObjectType
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+del types
+
+
+GLX_VERSION_1_1 = _glxlib.GLX_VERSION_1_1
+GLX_VERSION_1_2 = _glxlib.GLX_VERSION_1_2
+GLX_VERSION_1_3 = _glxlib.GLX_VERSION_1_3
+GLX_VERSION_1_4 = _glxlib.GLX_VERSION_1_4
+GLX_EXTENSION_NAME = _glxlib.GLX_EXTENSION_NAME
+GLX_USE_GL = _glxlib.GLX_USE_GL
+GLX_BUFFER_SIZE = _glxlib.GLX_BUFFER_SIZE
+GLX_LEVEL = _glxlib.GLX_LEVEL
+GLX_RGBA = _glxlib.GLX_RGBA
+GLX_DOUBLEBUFFER = _glxlib.GLX_DOUBLEBUFFER
+GLX_STEREO = _glxlib.GLX_STEREO
+GLX_AUX_BUFFERS = _glxlib.GLX_AUX_BUFFERS
+GLX_RED_SIZE = _glxlib.GLX_RED_SIZE
+GLX_GREEN_SIZE = _glxlib.GLX_GREEN_SIZE
+GLX_BLUE_SIZE = _glxlib.GLX_BLUE_SIZE
+GLX_ALPHA_SIZE = _glxlib.GLX_ALPHA_SIZE
+GLX_DEPTH_SIZE = _glxlib.GLX_DEPTH_SIZE
+GLX_STENCIL_SIZE = _glxlib.GLX_STENCIL_SIZE
+GLX_ACCUM_RED_SIZE = _glxlib.GLX_ACCUM_RED_SIZE
+GLX_ACCUM_GREEN_SIZE = _glxlib.GLX_ACCUM_GREEN_SIZE
+GLX_ACCUM_BLUE_SIZE = _glxlib.GLX_ACCUM_BLUE_SIZE
+GLX_ACCUM_ALPHA_SIZE = _glxlib.GLX_ACCUM_ALPHA_SIZE
+GLX_BAD_SCREEN = _glxlib.GLX_BAD_SCREEN
+GLX_BAD_ATTRIBUTE = _glxlib.GLX_BAD_ATTRIBUTE
+GLX_NO_EXTENSION = _glxlib.GLX_NO_EXTENSION
+GLX_BAD_VISUAL = _glxlib.GLX_BAD_VISUAL
+GLX_BAD_CONTEXT = _glxlib.GLX_BAD_CONTEXT
+GLX_BAD_VALUE = _glxlib.GLX_BAD_VALUE
+GLX_BAD_ENUM = _glxlib.GLX_BAD_ENUM
+GLX_VENDOR = _glxlib.GLX_VENDOR
+GLX_VERSION = _glxlib.GLX_VERSION
+GLX_EXTENSIONS = _glxlib.GLX_EXTENSIONS
+GLX_CONFIG_CAVEAT = _glxlib.GLX_CONFIG_CAVEAT
+GLX_DONT_CARE = _glxlib.GLX_DONT_CARE
+GLX_X_VISUAL_TYPE = _glxlib.GLX_X_VISUAL_TYPE
+GLX_TRANSPARENT_TYPE = _glxlib.GLX_TRANSPARENT_TYPE
+GLX_TRANSPARENT_INDEX_VALUE = _glxlib.GLX_TRANSPARENT_INDEX_VALUE
+GLX_TRANSPARENT_RED_VALUE = _glxlib.GLX_TRANSPARENT_RED_VALUE
+GLX_TRANSPARENT_GREEN_VALUE = _glxlib.GLX_TRANSPARENT_GREEN_VALUE
+GLX_TRANSPARENT_BLUE_VALUE = _glxlib.GLX_TRANSPARENT_BLUE_VALUE
+GLX_TRANSPARENT_ALPHA_VALUE = _glxlib.GLX_TRANSPARENT_ALPHA_VALUE
+GLX_WINDOW_BIT = _glxlib.GLX_WINDOW_BIT
+GLX_PIXMAP_BIT = _glxlib.GLX_PIXMAP_BIT
+GLX_PBUFFER_BIT = _glxlib.GLX_PBUFFER_BIT
+GLX_AUX_BUFFERS_BIT = _glxlib.GLX_AUX_BUFFERS_BIT
+GLX_FRONT_LEFT_BUFFER_BIT = _glxlib.GLX_FRONT_LEFT_BUFFER_BIT
+GLX_FRONT_RIGHT_BUFFER_BIT = _glxlib.GLX_FRONT_RIGHT_BUFFER_BIT
+GLX_BACK_LEFT_BUFFER_BIT = _glxlib.GLX_BACK_LEFT_BUFFER_BIT
+GLX_BACK_RIGHT_BUFFER_BIT = _glxlib.GLX_BACK_RIGHT_BUFFER_BIT
+GLX_DEPTH_BUFFER_BIT = _glxlib.GLX_DEPTH_BUFFER_BIT
+GLX_STENCIL_BUFFER_BIT = _glxlib.GLX_STENCIL_BUFFER_BIT
+GLX_ACCUM_BUFFER_BIT = _glxlib.GLX_ACCUM_BUFFER_BIT
+GLX_NONE = _glxlib.GLX_NONE
+GLX_SLOW_CONFIG = _glxlib.GLX_SLOW_CONFIG
+GLX_TRUE_COLOR = _glxlib.GLX_TRUE_COLOR
+GLX_DIRECT_COLOR = _glxlib.GLX_DIRECT_COLOR
+GLX_PSEUDO_COLOR = _glxlib.GLX_PSEUDO_COLOR
+GLX_STATIC_COLOR = _glxlib.GLX_STATIC_COLOR
+GLX_GRAY_SCALE = _glxlib.GLX_GRAY_SCALE
+GLX_STATIC_GRAY = _glxlib.GLX_STATIC_GRAY
+GLX_TRANSPARENT_RGB = _glxlib.GLX_TRANSPARENT_RGB
+GLX_TRANSPARENT_INDEX = _glxlib.GLX_TRANSPARENT_INDEX
+GLX_VISUAL_ID = _glxlib.GLX_VISUAL_ID
+GLX_SCREEN = _glxlib.GLX_SCREEN
+GLX_NON_CONFORMANT_CONFIG = _glxlib.GLX_NON_CONFORMANT_CONFIG
+GLX_DRAWABLE_TYPE = _glxlib.GLX_DRAWABLE_TYPE
+GLX_RENDER_TYPE = _glxlib.GLX_RENDER_TYPE
+GLX_X_RENDERABLE = _glxlib.GLX_X_RENDERABLE
+GLX_FBCONFIG_ID = _glxlib.GLX_FBCONFIG_ID
+GLX_RGBA_TYPE = _glxlib.GLX_RGBA_TYPE
+GLX_COLOR_INDEX_TYPE = _glxlib.GLX_COLOR_INDEX_TYPE
+GLX_MAX_PBUFFER_WIDTH = _glxlib.GLX_MAX_PBUFFER_WIDTH
+GLX_MAX_PBUFFER_HEIGHT = _glxlib.GLX_MAX_PBUFFER_HEIGHT
+GLX_MAX_PBUFFER_PIXELS = _glxlib.GLX_MAX_PBUFFER_PIXELS
+GLX_PRESERVED_CONTENTS = _glxlib.GLX_PRESERVED_CONTENTS
+GLX_LARGEST_PBUFFER = _glxlib.GLX_LARGEST_PBUFFER
+GLX_WIDTH = _glxlib.GLX_WIDTH
+GLX_HEIGHT = _glxlib.GLX_HEIGHT
+GLX_EVENT_MASK = _glxlib.GLX_EVENT_MASK
+GLX_DAMAGED = _glxlib.GLX_DAMAGED
+GLX_SAVED = _glxlib.GLX_SAVED
+GLX_WINDOW = _glxlib.GLX_WINDOW
+GLX_PBUFFER = _glxlib.GLX_PBUFFER
+GLX_PBUFFER_HEIGHT = _glxlib.GLX_PBUFFER_HEIGHT
+GLX_PBUFFER_WIDTH = _glxlib.GLX_PBUFFER_WIDTH
+GLX_RGBA_BIT = _glxlib.GLX_RGBA_BIT
+GLX_COLOR_INDEX_BIT = _glxlib.GLX_COLOR_INDEX_BIT
+GLX_PBUFFER_CLOBBER_MASK = _glxlib.GLX_PBUFFER_CLOBBER_MASK
+GLX_SAMPLE_BUFFERS = _glxlib.GLX_SAMPLE_BUFFERS
+GLX_SAMPLES = _glxlib.GLX_SAMPLES
+glXChooseVisual = _glxlib.glXChooseVisual
+glXCreateContext = _glxlib.glXCreateContext
+glXDestroyContext = _glxlib.glXDestroyContext
+glXMakeCurrent = _glxlib.glXMakeCurrent
+glXCopyContext = _glxlib.glXCopyContext
+glXSwapBuffers = _glxlib.glXSwapBuffers
+glXCreateGLXPixmap = _glxlib.glXCreateGLXPixmap
+glXDestroyGLXPixmap = _glxlib.glXDestroyGLXPixmap
+glXQueryExtension = _glxlib.glXQueryExtension
+glXQueryVersion = _glxlib.glXQueryVersion
+glXIsDirect = _glxlib.glXIsDirect
+glXGetConfig = _glxlib.glXGetConfig
+glXGetCurrentContext = _glxlib.glXGetCurrentContext
+glXGetCurrentDrawable = _glxlib.glXGetCurrentDrawable
+glXWaitGL = _glxlib.glXWaitGL
+glXWaitX = _glxlib.glXWaitX
+glXUseXFont = _glxlib.glXUseXFont
+glXQueryExtensionsString = _glxlib.glXQueryExtensionsString
+glXQueryServerString = _glxlib.glXQueryServerString
+glXGetClientString = _glxlib.glXGetClientString
+glXGetCurrentDisplay = _glxlib.glXGetCurrentDisplay
+glXChooseFBConfig = _glxlib.glXChooseFBConfig
+glXGetFBConfigAttrib = _glxlib.glXGetFBConfigAttrib
+glXGetFBConfigs = _glxlib.glXGetFBConfigs
+glXGetVisualFromFBConfig = _glxlib.glXGetVisualFromFBConfig
+glXCreateWindow = _glxlib.glXCreateWindow
+glXDestroyWindow = _glxlib.glXDestroyWindow
+glXCreatePixmap = _glxlib.glXCreatePixmap
+glXDestroyPixmap = _glxlib.glXDestroyPixmap
+glXCreatePbuffer = _glxlib.glXCreatePbuffer
+glXDestroyPbuffer = _glxlib.glXDestroyPbuffer
+glXQueryDrawable = _glxlib.glXQueryDrawable
+glXCreateNewContext = _glxlib.glXCreateNewContext
+glXMakeContextCurrent = _glxlib.glXMakeContextCurrent
+glXGetCurrentReadDrawable = _glxlib.glXGetCurrentReadDrawable
+glXQueryContext = _glxlib.glXQueryContext
+glXSelectEvent = _glxlib.glXSelectEvent
+glXGetSelectedEvent = _glxlib.glXGetSelectedEvent
+glXGetProcAddress = _glxlib.glXGetProcAddress
+glXAllocateMemoryNV = _glxlib.glXAllocateMemoryNV
+glXFreeMemoryNV = _glxlib.glXFreeMemoryNV
+GLX_MESA_allocate_memory = _glxlib.GLX_MESA_allocate_memory
+glXAllocateMemoryMESA = _glxlib.glXAllocateMemoryMESA
+glXFreeMemoryMESA = _glxlib.glXFreeMemoryMESA
+glXGetMemoryOffsetMESA = _glxlib.glXGetMemoryOffsetMESA
+GLX_ARB_render_texture = _glxlib.GLX_ARB_render_texture
+glXBindTexImageARB = _glxlib.glXBindTexImageARB
+glXReleaseTexImageARB = _glxlib.glXReleaseTexImageARB
+glXDrawableAttribARB = _glxlib.glXDrawableAttribARB
+GLX_NV_float_buffer = _glxlib.GLX_NV_float_buffer
+GLX_FLOAT_COMPONENTS_NV = _glxlib.GLX_FLOAT_COMPONENTS_NV
+GLX_MESA_swap_frame_usage = _glxlib.GLX_MESA_swap_frame_usage
+glXGetFrameUsageMESA = _glxlib.glXGetFrameUsageMESA
+glXBeginFrameTrackingMESA = _glxlib.glXBeginFrameTrackingMESA
+glXEndFrameTrackingMESA = _glxlib.glXEndFrameTrackingMESA
+glXQueryFrameTrackingMESA = _glxlib.glXQueryFrameTrackingMESA
+GLX_MESA_swap_control = _glxlib.GLX_MESA_swap_control
+glXSwapIntervalMESA = _glxlib.glXSwapIntervalMESA
+glXGetSwapIntervalMESA = _glxlib.glXGetSwapIntervalMESA
+GLX_EXT_texture_from_pixmap = _glxlib.GLX_EXT_texture_from_pixmap
+GLX_BIND_TO_TEXTURE_RGB_EXT = _glxlib.GLX_BIND_TO_TEXTURE_RGB_EXT
+GLX_BIND_TO_TEXTURE_RGBA_EXT = _glxlib.GLX_BIND_TO_TEXTURE_RGBA_EXT
+GLX_BIND_TO_MIPMAP_TEXTURE_EXT = _glxlib.GLX_BIND_TO_MIPMAP_TEXTURE_EXT
+GLX_BIND_TO_TEXTURE_TARGETS_EXT = _glxlib.GLX_BIND_TO_TEXTURE_TARGETS_EXT
+GLX_Y_INVERTED_EXT = _glxlib.GLX_Y_INVERTED_EXT
+GLX_TEXTURE_FORMAT_EXT = _glxlib.GLX_TEXTURE_FORMAT_EXT
+GLX_TEXTURE_TARGET_EXT = _glxlib.GLX_TEXTURE_TARGET_EXT
+GLX_MIPMAP_TEXTURE_EXT = _glxlib.GLX_MIPMAP_TEXTURE_EXT
+GLX_TEXTURE_FORMAT_NONE_EXT = _glxlib.GLX_TEXTURE_FORMAT_NONE_EXT
+GLX_TEXTURE_FORMAT_RGB_EXT = _glxlib.GLX_TEXTURE_FORMAT_RGB_EXT
+GLX_TEXTURE_FORMAT_RGBA_EXT = _glxlib.GLX_TEXTURE_FORMAT_RGBA_EXT
+GLX_TEXTURE_1D_BIT_EXT = _glxlib.GLX_TEXTURE_1D_BIT_EXT
+GLX_TEXTURE_2D_BIT_EXT = _glxlib.GLX_TEXTURE_2D_BIT_EXT
+GLX_TEXTURE_RECTANGLE_BIT_EXT = _glxlib.GLX_TEXTURE_RECTANGLE_BIT_EXT
+GLX_TEXTURE_1D_EXT = _glxlib.GLX_TEXTURE_1D_EXT
+GLX_TEXTURE_2D_EXT = _glxlib.GLX_TEXTURE_2D_EXT
+GLX_TEXTURE_RECTANGLE_EXT = _glxlib.GLX_TEXTURE_RECTANGLE_EXT
+GLX_FRONT_LEFT_EXT = _glxlib.GLX_FRONT_LEFT_EXT
+GLX_FRONT_RIGHT_EXT = _glxlib.GLX_FRONT_RIGHT_EXT
+GLX_BACK_LEFT_EXT = _glxlib.GLX_BACK_LEFT_EXT
+GLX_BACK_RIGHT_EXT = _glxlib.GLX_BACK_RIGHT_EXT
+GLX_FRONT_EXT = _glxlib.GLX_FRONT_EXT
+GLX_BACK_EXT = _glxlib.GLX_BACK_EXT
+GLX_AUX0_EXT = _glxlib.GLX_AUX0_EXT
+GLX_AUX1_EXT = _glxlib.GLX_AUX1_EXT
+GLX_AUX2_EXT = _glxlib.GLX_AUX2_EXT
+GLX_AUX3_EXT = _glxlib.GLX_AUX3_EXT
+GLX_AUX4_EXT = _glxlib.GLX_AUX4_EXT
+GLX_AUX5_EXT = _glxlib.GLX_AUX5_EXT
+GLX_AUX6_EXT = _glxlib.GLX_AUX6_EXT
+GLX_AUX7_EXT = _glxlib.GLX_AUX7_EXT
+GLX_AUX8_EXT = _glxlib.GLX_AUX8_EXT
+GLX_AUX9_EXT = _glxlib.GLX_AUX9_EXT
+glXBindTexImageEXT = _glxlib.glXBindTexImageEXT
+glXReleaseTexImageEXT = _glxlib.glXReleaseTexImageEXT
+class GLXPbufferClobberEvent(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, GLXPbufferClobberEvent, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, GLXPbufferClobberEvent, name)
+    __repr__ = _swig_repr
+    __swig_setmethods__["event_type"] = _glxlib.GLXPbufferClobberEvent_event_type_set
+    __swig_getmethods__["event_type"] = _glxlib.GLXPbufferClobberEvent_event_type_get
+    if _newclass:event_type = _swig_property(_glxlib.GLXPbufferClobberEvent_event_type_get, _glxlib.GLXPbufferClobberEvent_event_type_set)
+    __swig_setmethods__["draw_type"] = _glxlib.GLXPbufferClobberEvent_draw_type_set
+    __swig_getmethods__["draw_type"] = _glxlib.GLXPbufferClobberEvent_draw_type_get
+    if _newclass:draw_type = _swig_property(_glxlib.GLXPbufferClobberEvent_draw_type_get, _glxlib.GLXPbufferClobberEvent_draw_type_set)
+    __swig_setmethods__["serial"] = _glxlib.GLXPbufferClobberEvent_serial_set
+    __swig_getmethods__["serial"] = _glxlib.GLXPbufferClobberEvent_serial_get
+    if _newclass:serial = _swig_property(_glxlib.GLXPbufferClobberEvent_serial_get, _glxlib.GLXPbufferClobberEvent_serial_set)
+    __swig_setmethods__["send_event"] = _glxlib.GLXPbufferClobberEvent_send_event_set
+    __swig_getmethods__["send_event"] = _glxlib.GLXPbufferClobberEvent_send_event_get
+    if _newclass:send_event = _swig_property(_glxlib.GLXPbufferClobberEvent_send_event_get, _glxlib.GLXPbufferClobberEvent_send_event_set)
+    __swig_setmethods__["display"] = _glxlib.GLXPbufferClobberEvent_display_set
+    __swig_getmethods__["display"] = _glxlib.GLXPbufferClobberEvent_display_get
+    if _newclass:display = _swig_property(_glxlib.GLXPbufferClobberEvent_display_get, _glxlib.GLXPbufferClobberEvent_display_set)
+    __swig_setmethods__["drawable"] = _glxlib.GLXPbufferClobberEvent_drawable_set
+    __swig_getmethods__["drawable"] = _glxlib.GLXPbufferClobberEvent_drawable_get
+    if _newclass:drawable = _swig_property(_glxlib.GLXPbufferClobberEvent_drawable_get, _glxlib.GLXPbufferClobberEvent_drawable_set)
+    __swig_setmethods__["buffer_mask"] = _glxlib.GLXPbufferClobberEvent_buffer_mask_set
+    __swig_getmethods__["buffer_mask"] = _glxlib.GLXPbufferClobberEvent_buffer_mask_get
+    if _newclass:buffer_mask = _swig_property(_glxlib.GLXPbufferClobberEvent_buffer_mask_get, _glxlib.GLXPbufferClobberEvent_buffer_mask_set)
+    __swig_setmethods__["aux_buffer"] = _glxlib.GLXPbufferClobberEvent_aux_buffer_set
+    __swig_getmethods__["aux_buffer"] = _glxlib.GLXPbufferClobberEvent_aux_buffer_get
+    if _newclass:aux_buffer = _swig_property(_glxlib.GLXPbufferClobberEvent_aux_buffer_get, _glxlib.GLXPbufferClobberEvent_aux_buffer_set)
+    __swig_setmethods__["x"] = _glxlib.GLXPbufferClobberEvent_x_set
+    __swig_getmethods__["x"] = _glxlib.GLXPbufferClobberEvent_x_get
+    if _newclass:x = _swig_property(_glxlib.GLXPbufferClobberEvent_x_get, _glxlib.GLXPbufferClobberEvent_x_set)
+    __swig_setmethods__["y"] = _glxlib.GLXPbufferClobberEvent_y_set
+    __swig_getmethods__["y"] = _glxlib.GLXPbufferClobberEvent_y_get
+    if _newclass:y = _swig_property(_glxlib.GLXPbufferClobberEvent_y_get, _glxlib.GLXPbufferClobberEvent_y_set)
+    __swig_setmethods__["width"] = _glxlib.GLXPbufferClobberEvent_width_set
+    __swig_getmethods__["width"] = _glxlib.GLXPbufferClobberEvent_width_get
+    if _newclass:width = _swig_property(_glxlib.GLXPbufferClobberEvent_width_get, _glxlib.GLXPbufferClobberEvent_width_set)
+    __swig_setmethods__["height"] = _glxlib.GLXPbufferClobberEvent_height_set
+    __swig_getmethods__["height"] = _glxlib.GLXPbufferClobberEvent_height_get
+    if _newclass:height = _swig_property(_glxlib.GLXPbufferClobberEvent_height_get, _glxlib.GLXPbufferClobberEvent_height_set)
+    __swig_setmethods__["count"] = _glxlib.GLXPbufferClobberEvent_count_set
+    __swig_getmethods__["count"] = _glxlib.GLXPbufferClobberEvent_count_get
+    if _newclass:count = _swig_property(_glxlib.GLXPbufferClobberEvent_count_get, _glxlib.GLXPbufferClobberEvent_count_set)
+    def __init__(self, *args): 
+        this = _glxlib.new_GLXPbufferClobberEvent(*args)
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _glxlib.delete_GLXPbufferClobberEvent
+    __del__ = lambda self : None;
+GLXPbufferClobberEvent_swigregister = _glxlib.GLXPbufferClobberEvent_swigregister
+GLXPbufferClobberEvent_swigregister(GLXPbufferClobberEvent)
+cvar = _glxlib.cvar
+
+class GLXEvent(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, GLXEvent, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, GLXEvent, name)
+    __repr__ = _swig_repr
+    __swig_setmethods__["glxpbufferclobber"] = _glxlib.GLXEvent_glxpbufferclobber_set
+    __swig_getmethods__["glxpbufferclobber"] = _glxlib.GLXEvent_glxpbufferclobber_get
+    if _newclass:glxpbufferclobber = _swig_property(_glxlib.GLXEvent_glxpbufferclobber_get, _glxlib.GLXEvent_glxpbufferclobber_set)
+    __swig_setmethods__["pad"] = _glxlib.GLXEvent_pad_set
+    __swig_getmethods__["pad"] = _glxlib.GLXEvent_pad_get
+    if _newclass:pad = _swig_property(_glxlib.GLXEvent_pad_get, _glxlib.GLXEvent_pad_set)
+    def __init__(self, *args): 
+        this = _glxlib.new_GLXEvent(*args)
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _glxlib.delete_GLXEvent
+    __del__ = lambda self : None;
+GLXEvent_swigregister = _glxlib.GLXEvent_swigregister
+GLXEvent_swigregister(GLXEvent)
+
+XOpenDisplay = _glxlib.XOpenDisplay
+XCloseDisplay = _glxlib.XCloseDisplay
+GLXContext_Null = _glxlib.GLXContext_Null
+
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib_wrap.c
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib_wrap.c	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/glxlib_wrap.c	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,9048 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.33
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic CAPI SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "3"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The swig conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old swig versions, you usually write code as:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit as:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   that seems to be the same, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   requires also to SWIG_ConvertPtr to return new result values, as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   swig errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+
+
+ */
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store inforomation on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/* think of this as a c++ template<> or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty)         \
+  if (ty) {                                             \
+    swig_cast_info *iter = ty->cast;                    \
+    while (iter) {                                      \
+      if (comparison) {                                 \
+        if (iter == ty->cast) return iter;              \
+        /* Move iter to the top of the linked list */   \
+        iter->prev->next = iter->next;                  \
+        if (iter->next)                                 \
+          iter->next->prev = iter->prev;                \
+        iter->next = ty->cast;                          \
+        iter->prev = 0;                                 \
+        if (ty->cast) ty->cast->prev = iter;            \
+        ty->cast = iter;                                \
+        return iter;                                    \
+      }                                                 \
+      iter = iter->next;                                \
+    }                                                   \
+  }                                                     \
+  return 0
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
+}
+
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+  SWIG_TypeCheck_Template(iter->type == from, into);
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_Format(PyExc_RuntimeError, mesg);
+  }
+}
+
+
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, (char *) msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+  PyDict_SetItemString(d, (char*) name, obj);
+  Py_DECREF(obj);                            
+}
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* PySwigClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+} PySwigClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME PySwigClientData * 
+PySwigClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+PySwigClientData_Del(PySwigClientData* data)
+{
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== PySwigObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+} PySwigObject;
+
+SWIGRUNTIME PyObject *
+PySwigObject_long(PySwigObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_format(const char* fmt, PySwigObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
+      PyObject *ofmt = PyString_FromString(fmt);
+      if (ofmt) {
+	res = PyString_Format(ofmt,args);
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_oct(PySwigObject *v)
+{
+  return PySwigObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_hex(PySwigObject *v)
+{
+  return PySwigObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+PySwigObject_repr(PySwigObject *v)
+#else
+PySwigObject_repr(PySwigObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *hex = PySwigObject_hex(v);    
+  PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
+  Py_DECREF(hex);
+  if (v->next) {
+#ifdef METH_NOARGS
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
+#else
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
+#endif
+    PyString_ConcatAndDel(&repr,nrep);
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+#ifdef METH_NOARGS
+  PyObject *repr = PySwigObject_repr(v);
+#else
+  PyObject *repr = PySwigObject_repr(v, NULL);
+#endif
+  if (repr) {
+    fputs(PyString_AsString(repr), fp);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_str(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    PyString_FromString(result) : 0;
+}
+
+SWIGRUNTIME int
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigObject_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigObject_type())
+    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+PySwigObject_dealloc(PyObject *v)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own) {
+    swig_type_info *ty = sobj->ty;
+    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporal object to carry the destroy operation */
+	PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } else {
+      const char *name = SWIG_TypePrettyName(ty);
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
+#endif
+    }
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+PySwigObject_append(PyObject* v, PyObject* next)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!PySwigObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+PySwigObject_next(PyObject* v)
+#else
+PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_disown(PyObject *v)
+#else
+PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_acquire(PyObject *v)
+#else
+PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+PySwigObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      PySwigObject *sobj = (PySwigObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v);
+	} else {
+	  PySwigObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v,args);
+	} else {
+	  PySwigObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+PySwigObject_getattr(PySwigObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+_PySwigObject_type(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods PySwigObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    (binaryfunc)0, /*nb_divide*/
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+    (coercion)0,   /*nb_coerce*/
+    (unaryfunc)PySwigObject_long, /*nb_int*/
+    (unaryfunc)PySwigObject_long, /*nb_long*/
+    (unaryfunc)0,                 /*nb_float*/
+    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
+    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject pyswigobject_type;  
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */
+	(char *)"PySwigObject",		    /* tp_name */
+	sizeof(PySwigObject),		    /* tp_basicsize */
+	0,			            /* tp_itemsize */
+	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
+	(printfunc)PySwigObject_print,	    /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
+#else
+	(getattrfunc)0,			    /* tp_getattr */ 
+#endif
+	(setattrfunc)0,			    /* tp_setattr */ 
+	(cmpfunc)PySwigObject_compare,	    /* tp_compare */ 
+	(reprfunc)PySwigObject_repr,	    /* tp_repr */    
+	&PySwigObject_as_number,	    /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)PySwigObject_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigobject_doc, 	            /* tp_doc */        
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	swigobject_methods,		    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0,	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigobject_type = tmp;
+    pyswigobject_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigobject_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} PySwigPacked;
+
+SWIGRUNTIME int
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+PySwigPacked_repr(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_str(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return PyString_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return PyString_FromString(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigPacked_Check(PyObject *op) {
+  return ((op)->ob_type == _PySwigPacked_type()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+}
+
+SWIGRUNTIME void
+PySwigPacked_dealloc(PyObject *v)
+{
+  if (PySwigPacked_Check(v)) {
+    PySwigPacked *sobj = (PySwigPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+_PySwigPacked_type(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject pyswigpacked_type;
+  static int type_init = 0;  
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */	
+	(char *)"PySwigPacked",		    /* tp_name */	
+	sizeof(PySwigPacked),		    /* tp_basicsize */	
+	0,				    /* tp_itemsize */	
+	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)PySwigPacked_print,	    /* tp_print */   	
+	(getattrfunc)0,			    /* tp_getattr */ 	
+	(setattrfunc)0,			    /* tp_setattr */ 	
+	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
+	(reprfunc)PySwigPacked_repr,	    /* tp_repr */    	
+	0,	                            /* tp_as_number */	
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */	
+	(hashfunc)0,			    /* tp_hash */	
+	(ternaryfunc)0,			    /* tp_call */	
+	(reprfunc)PySwigPacked_str,	    /* tp_str */	
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigpacked_doc, 	            /* tp_doc */
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	0,		                    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0, 	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigpacked_type = tmp;
+    pyswigpacked_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigpacked_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (PySwigPacked_Check(obj)) {
+    PySwigPacked *sobj = (PySwigPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+  return PyString_FromString("this");
+}
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+SWIGRUNTIME PySwigObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  if (PySwigObject_Check(pyobj)) {
+    return (PySwigObject *) pyobj;
+  } else {
+    PyObject *obj = 0;
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+    if (PyInstance_Check(pyobj)) {
+      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+    } else {
+      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+      } else {
+#ifdef PyWeakref_CheckProxy
+	if (PyWeakref_CheckProxy(pyobj)) {
+	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+	}
+#endif
+	obj = PyObject_GetAttr(pyobj,SWIG_This());
+	if (obj) {
+	  Py_DECREF(obj);
+	} else {
+	  if (PyErr_Occurred()) PyErr_Clear();
+	  return 0;
+	}
+      }
+    }
+#else
+    obj = PyObject_GetAttr(pyobj,SWIG_This());
+    if (obj) {
+      Py_DECREF(obj);
+    } else {
+      if (PyErr_Occurred()) PyErr_Clear();
+      return 0;
+    }
+#endif
+    if (obj && !PySwigObject_Check(obj)) {
+      /* a PyObject is called 'this', try to get the 'real this'
+	 PySwigObject from it */ 
+      return SWIG_Python_GetSwigThis(obj);
+    }
+    return (PySwigObject *)obj;
+  }
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own) {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  if (!obj) return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr) *ptr = 0;
+    return SWIG_OK;
+  } else {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    while (sobj) {
+      void *vptr = sobj->ptr;
+      if (ty) {
+	swig_type_info *to = sobj->ty;
+	if (to == ty) {
+	  /* no type cast needed */
+	  if (ptr) *ptr = vptr;
+	  break;
+	} else {
+	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+	  if (!tc) {
+	    sobj = (PySwigObject *)sobj->next;
+	  } else {
+	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+	    break;
+	  }
+	}
+      } else {
+	if (ptr) *ptr = vptr;
+	break;
+      }
+    }
+    if (sobj) {
+      if (own) *own = sobj->own;
+      if (flags & SWIG_POINTER_DISOWN) {
+	sobj->own = 0;
+      }
+      return SWIG_OK;
+    } else {
+      int res = SWIG_ERROR;
+      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+	PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+	if (data && !data->implicitconv) {
+	  PyObject *klass = data->klass;
+	  if (klass) {
+	    PyObject *impconv;
+	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+	    impconv = SWIG_Python_CallFunctor(klass, obj);
+	    data->implicitconv = 0;
+	    if (PyErr_Occurred()) {
+	      PyErr_Clear();
+	      impconv = 0;
+	    }
+	    if (impconv) {
+	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      if (iobj) {
+		void *vptr;
+		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+		if (SWIG_IsOK(res)) {
+		  if (ptr) {
+		    *ptr = vptr;
+		    /* transfer the ownership to 'ptr' */
+		    iobj->own = 0;
+		    res = SWIG_AddCast(res);
+		    res = SWIG_AddNewMask(res);
+		  } else {
+		    res = SWIG_AddCast(res);		    
+		  }
+		}
+	      }
+	      Py_DECREF(impconv);
+	    }
+	  }
+	}
+      }
+      return res;
+    }
+  }
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc) {
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+      if (!desc) return SWIG_ERROR;
+    }
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (!tc) return SWIG_ERROR;
+      *ptr = SWIG_TypeCast(tc,vptr);
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, whitout calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      PySwigObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
+  if (!ptr) {
+    return SWIG_Py_Void();
+  } else {
+    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+    PyObject *robj = PySwigObject_New(ptr, type, own);
+    PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
+    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+      if (inst) {
+	Py_DECREF(robj);
+	robj = inst;
+      }
+    }
+    return robj;
+  }
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+SWIG_Python_DestroyModule(void *vptr)
+{
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
+      if (data) PySwigClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
+
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				   swig_empty_runtime_method_table);
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = PyString_FromString(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+      }
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigObject_GetDesc(PyObject *self)
+{
+  PySwigObject *v = (PySwigObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && PySwigObject_Check(obj)) {
+      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? PyString_AsString(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+    if (flags & SWIG_POINTER_EXCEPTION) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+  }
+  return result;
+}
+
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_Display swig_types[0]
+#define SWIGTYPE_p_Font swig_types[1]
+#define SWIGTYPE_p_GLXPbufferClobberEvent swig_types[2]
+#define SWIGTYPE_p_Pixmap swig_types[3]
+#define SWIGTYPE_p_Window swig_types[4]
+#define SWIGTYPE_p_XID swig_types[5]
+#define SWIGTYPE_p_XVisualInfo swig_types[6]
+#define SWIGTYPE_p___GLXEvent swig_types[7]
+#define SWIGTYPE_p___GLXFBConfigRec swig_types[8]
+#define SWIGTYPE_p___GLXcontextRec swig_types[9]
+#define SWIGTYPE_p_char swig_types[10]
+#define SWIGTYPE_p_double swig_types[11]
+#define SWIGTYPE_p_f_void__void swig_types[12]
+#define SWIGTYPE_p_float swig_types[13]
+#define SWIGTYPE_p_int swig_types[14]
+#define SWIGTYPE_p_int64_t swig_types[15]
+#define SWIGTYPE_p_long swig_types[16]
+#define SWIGTYPE_p_p___GLXFBConfigRec swig_types[17]
+#define SWIGTYPE_p_short swig_types[18]
+#define SWIGTYPE_p_signed_char swig_types[19]
+#define SWIGTYPE_p_unsigned_char swig_types[20]
+#define SWIGTYPE_p_unsigned_int swig_types[21]
+#define SWIGTYPE_p_unsigned_long swig_types[22]
+#define SWIGTYPE_p_unsigned_short swig_types[23]
+#define SWIGTYPE_p_void swig_types[24]
+static swig_type_info *swig_types[26];
+static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _glxlib.so
+  ------------------------------------------------*/
+#define SWIG_init    init_glxlib
+
+#define SWIG_name    "_glxlib"
+
+#define SWIGVERSION 0x010333 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <X11/Xlib.h>
+#include <GL/glx.h>
+#include <pythonplus.h>
+
+static int glx_DefaultScreen( Display* dpy)
+{
+  return DefaultScreen( dpy);
+}
+
+
+int checkArraySize = 1;
+int checkArgumentsInCWrapper=1;
+
+#include "numpy/arrayobject.h"
+
+int NumericTypecode(char *type)
+{
+  /* maps GL types to Numeric types */
+  if (strcmp(type,"GLbyte")==0) return NPY_BYTE;
+  else if (strcmp(type,"GLdouble")==0) return NPY_DOUBLE;
+  else if (strcmp(type,"GLfloat")==0) return NPY_FLOAT;
+  else if (strcmp(type,"GLint")==0) return NPY_INT;
+  else if (strcmp(type,"GLshort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLubyte")==0) return NPY_UBYTE;
+  else if (strcmp(type,"GLuint")==0) return NPY_INT;
+  else if (strcmp(type,"GLushort")==0) return NPY_SHORT;
+  else if (strcmp(type,"GLboolean")==0) return NPY_UBYTE;
+}
+
+/*********************************************
+   1. Check if the incomming object is a buffer object.
+   2. If buffer - check if it is a numeric array.
+   3. If numeric array -  check if it is contiguous - 
+        return 1.
+   4. If buffer but not a numeric array - return 1.
+   5. In all other cases return 0.
+*******************************************/
+int isContiguosBuffer(PyObject *incommingObject)
+{
+  int contig;
+  /** Check if object is a buffer object **/
+  /** if (PyBuffer_Check(incommingObject)) **/
+  PyBufferProcs *pb = incommingObject->ob_type->tp_as_buffer;
+  if (pb == NULL || pb->bf_getsegcount == NULL )
+    contig = 0;
+  else
+  {
+    /** printf ("object is a buffer\n"); **/
+    if (PyArray_Check(incommingObject))
+    {
+      /** printf ("object is a Numeric array\n"); **/
+      if (PyArray_ISCONTIGUOUS((PyArrayObject*)incommingObject))
+	contig = 1;
+      else contig = 0;	
+    }
+    else
+      contig = 1; 
+  }
+  return contig;
+}
+/**********************************************************
+This function takes a Python object and creates a Numeric Array 
+after checking that the incomming object is of an acceptable
+type(size).
+***********************************************************/
+
+void bufferWithCheck(PyObject *incommingObject, 
+		     PyArrayObject **Narray,
+                     char *type, int nbElem)
+{
+  char buf[255];
+  int typecode, size, i;
+  /**PyArrayObject *Narray; */
+  /* make contiguous if needed */
+  typecode = NumericTypecode(type);
+  *Narray = (PyArrayObject *)PyArray_ContiguousFromObject(incommingObject,
+							typecode, 0, 10 );
+  if (*Narray == NULL) 
+  {
+    sprintf(buf,"Failed to make a contiguous array of type %d\n",
+            typecode);
+    PyErr_SetString(PyExc_ValueError, buf);
+         *Narray =  NULL;
+  }
+   if (checkArraySize && nbElem)
+   {
+     /* check size */
+     size = 1;
+     for (i=0; i<((*Narray)->nd); i++)
+     size = size * ((*Narray)->dimensions[i]);
+     if (size!=nbElem) 
+     {
+       sprintf(buf, "%d values received when %d expected\n", size, nbElem);
+       PyErr_SetString(PyExc_ValueError, buf);
+       *Narray = NULL;
+     }
+   }
+}
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+  #define SWIG_From_long   PyInt_FromLong 
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+#include "opengltk.h"
+
+static struct opengltk_export* s_opengltk = NULL;
+PyObject_t PypImport_ModuleAttr( char const* modulename, char const* name)
+{
+  PyObject_t module, result;
+  module = PyImport_ImportModule( (char*)modulename);
+  if (NOT module) return NULL;
+  result = PyObject_GetAttrString( module, (char*)name);
+  Py_DECREF( module);
+  return result;
+}
+
+void* PypImport_ModuleCobjAttr( char const* module, char const* name)
+{
+  PyObject_t attr;
+  void* result;
+
+  attr = PypImport_ModuleAttr( module, name);
+  if (NOT attr) return NULL;
+  result = PyCObject_AsVoidPtr( attr);
+  Py_DECREF( attr);
+  return result;
+}
+
+
+
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery("_p_char");
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+  if (carray) {
+    if (size > INT_MAX) {
+      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+      return pchar_descriptor ? 
+	SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
+    } else {
+      return PyString_FromStringAndSize(carray, (int)(size));
+    }
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+
+SWIGINTERNINLINE PyObject * 
+SWIG_FromCharPtr(const char *cptr)
+{ 
+  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_float (PyObject * obj, float *val)
+{
+  double v;
+  int res = SWIG_AsVal_double (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < -FLT_MAX || v > FLT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (float)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE int
+SWIG_AsVal_size_t (PyObject * obj, size_t *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject* 
+SWIG_From_unsigned_SS_long  (unsigned long value)
+{
+  return (value > LONG_MAX) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); 
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_int  (unsigned int value)
+{    
+  return SWIG_From_unsigned_SS_long  (value);
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+{
+  if (PyString_Check(obj)) {
+    char *cstr; Py_ssize_t len;
+    PyString_AsStringAndSize(obj, &cstr, &len);
+    if (cptr)  {
+      if (alloc) {
+	/* 
+	   In python the user should not be able to modify the inner
+	   string representation. To warranty that, if you define
+	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
+	   buffer is always returned.
+
+	   The default behavior is just to return the pointer value,
+	   so, be careful.
+	*/ 
+#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
+	if (*alloc != SWIG_OLDOBJ) 
+#else
+	if (*alloc == SWIG_NEWOBJ) 
+#endif
+	  {
+	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+	    *alloc = SWIG_NEWOBJ;
+	  }
+	else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      } else {
+	*cptr = PyString_AsString(obj);
+      }
+    }
+    if (psize) *psize = len + 1;
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *) vptr;
+	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN int Swig_var_checkArgumentsInCWrapper_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""checkArgumentsInCWrapper""' of type '""int""'");
+    }
+    checkArgumentsInCWrapper = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_checkArgumentsInCWrapper_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(checkArgumentsInCWrapper));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXChooseVisual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  int *arg3 = (int *) 0 ;
+  XVisualInfo *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXChooseVisual",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXChooseVisual" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXChooseVisual" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (XVisualInfo *)glXChooseVisual(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XVisualInfo, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreateContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  XVisualInfo *arg2 = (XVisualInfo *) 0 ;
+  GLXContext arg3 = (GLXContext) 0 ;
+  Bool arg4 ;
+  GLXContext result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXCreateContext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreateContext" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XVisualInfo, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreateContext" "', argument " "2"" of type '" "XVisualInfo *""'"); 
+  }
+  arg2 = (XVisualInfo *)(argp2);
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXCreateContext" "', argument " "3"" of type '" "GLXContext""'"); 
+  }
+  arg3 = (GLXContext)(argp3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glXCreateContext" "', argument " "4"" of type '" "Bool""'");
+  } 
+  arg4 = (Bool)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXContext)glXCreateContext(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDestroyContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXContext arg2 = (GLXContext) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXDestroyContext",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDestroyContext" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDestroyContext" "', argument " "2"" of type '" "GLXContext""'"); 
+  }
+  arg2 = (GLXContext)(argp2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXDestroyContext(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXMakeCurrent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  GLXContext arg3 = (GLXContext) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXMakeCurrent",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXMakeCurrent" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXMakeCurrent" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXMakeCurrent" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXMakeCurrent" "', argument " "3"" of type '" "GLXContext""'"); 
+  }
+  arg3 = (GLXContext)(argp3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXMakeCurrent(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCopyContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXContext arg2 = (GLXContext) 0 ;
+  GLXContext arg3 = (GLXContext) 0 ;
+  unsigned long arg4 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  unsigned long val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXCopyContext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCopyContext" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCopyContext" "', argument " "2"" of type '" "GLXContext""'"); 
+  }
+  arg2 = (GLXContext)(argp2);
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXCopyContext" "', argument " "3"" of type '" "GLXContext""'"); 
+  }
+  arg3 = (GLXContext)(argp3);
+  ecode4 = SWIG_AsVal_unsigned_SS_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glXCopyContext" "', argument " "4"" of type '" "unsigned long""'");
+  } 
+  arg4 = (unsigned long)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXCopyContext(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXSwapBuffers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXSwapBuffers",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXSwapBuffers" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXSwapBuffers" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXSwapBuffers" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXSwapBuffers(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreateGLXPixmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  XVisualInfo *arg2 = (XVisualInfo *) 0 ;
+  Pixmap arg3 ;
+  GLXPixmap result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXCreateGLXPixmap",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreateGLXPixmap" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XVisualInfo, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreateGLXPixmap" "', argument " "2"" of type '" "XVisualInfo *""'"); 
+  }
+  arg2 = (XVisualInfo *)(argp2);
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Pixmap,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXCreateGLXPixmap" "', argument " "3"" of type '" "Pixmap""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXCreateGLXPixmap" "', argument " "3"" of type '" "Pixmap""'");
+    } else {
+      arg3 = *((Pixmap *)(argp3));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXCreateGLXPixmap(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXPixmap *)memcpy((GLXPixmap *)malloc(sizeof(GLXPixmap)),&result,sizeof(GLXPixmap)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDestroyGLXPixmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXPixmap arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXDestroyGLXPixmap",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDestroyGLXPixmap" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDestroyGLXPixmap" "', argument " "2"" of type '" "GLXPixmap""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXDestroyGLXPixmap" "', argument " "2"" of type '" "GLXPixmap""'");
+    } else {
+      arg2 = *((GLXPixmap *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXDestroyGLXPixmap(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryExtension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int *arg2 = (int *) 0 ;
+  int *arg3 = (int *) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXQueryExtension",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryExtension" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXQueryExtension(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int *arg2 = (int *) 0 ;
+  int *arg3 = (int *) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXQueryVersion",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryVersion" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXQueryVersion(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXIsDirect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXContext arg2 = (GLXContext) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXIsDirect",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXIsDirect" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXIsDirect" "', argument " "2"" of type '" "GLXContext""'"); 
+  }
+  arg2 = (GLXContext)(argp2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXIsDirect(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  XVisualInfo *arg2 = (XVisualInfo *) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXGetConfig",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetConfig" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XVisualInfo, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXGetConfig" "', argument " "2"" of type '" "XVisualInfo *""'"); 
+  }
+  arg2 = (XVisualInfo *)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXGetConfig" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXGetConfig(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetCurrentContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXContext result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXGetCurrentContext")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXContext)glXGetCurrentContext();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetCurrentDrawable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXDrawable result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXGetCurrentDrawable")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXGetCurrentDrawable();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXDrawable *)memcpy((GLXDrawable *)malloc(sizeof(GLXDrawable)),&result,sizeof(GLXDrawable)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXWaitGL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXWaitGL")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXWaitGL();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXWaitX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXWaitX")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXWaitX();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXUseXFont(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Font arg1 ;
+  int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  void *argp1 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXUseXFont",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  {
+    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Font,  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXUseXFont" "', argument " "1"" of type '" "Font""'"); 
+    }  
+    if (!argp1) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXUseXFont" "', argument " "1"" of type '" "Font""'");
+    } else {
+      arg1 = *((Font *)(argp1));
+    }
+  }
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXUseXFont" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXUseXFont" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glXUseXFont" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXUseXFont(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryExtensionsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  char *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXQueryExtensionsString",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryExtensionsString" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXQueryExtensionsString" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (char *)glXQueryExtensionsString(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryServerString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  int arg3 ;
+  char *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXQueryServerString",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryServerString" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXQueryServerString" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXQueryServerString" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (char *)glXQueryServerString(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetClientString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  char *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXGetClientString",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetClientString" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXGetClientString" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (char *)glXGetClientString(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  {
+    if (result) resultobj = PyString_FromString( (char const*)result);
+    else
+    {
+      Py_INCREF( Py_None);
+      resultobj = Py_None;
+    }
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetCurrentDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXGetCurrentDisplay")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Display *)glXGetCurrentDisplay();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Display, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXChooseFBConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  int *arg3 = (int *) 0 ;
+  int *arg4 = (int *) 0 ;
+  GLXFBConfig *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXChooseFBConfig",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXChooseFBConfig" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXChooseFBConfig" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXFBConfig *)glXChooseFBConfig(arg1,arg2,(int const *)arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p___GLXFBConfigRec, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetFBConfigAttrib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXGetFBConfigAttrib",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetFBConfigAttrib" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXGetFBConfigAttrib" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXGetFBConfigAttrib" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXGetFBConfigAttrib(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetFBConfigs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  int *arg3 = (int *) 0 ;
+  GLXFBConfig *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXGetFBConfigs",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetFBConfigs" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXGetFBConfigs" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXFBConfig *)glXGetFBConfigs(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p___GLXFBConfigRec, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetVisualFromFBConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  XVisualInfo *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXGetVisualFromFBConfig",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetVisualFromFBConfig" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXGetVisualFromFBConfig" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (XVisualInfo *)glXGetVisualFromFBConfig(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XVisualInfo, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreateWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  Window arg3 ;
+  int *arg4 = (int *) 0 ;
+  GLXWindow result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXCreateWindow",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreateWindow" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreateWindow" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Window,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXCreateWindow" "', argument " "3"" of type '" "Window""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXCreateWindow" "', argument " "3"" of type '" "Window""'");
+    } else {
+      arg3 = *((Window *)(argp3));
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXCreateWindow(arg1,arg2,arg3,(int const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXWindow *)memcpy((GLXWindow *)malloc(sizeof(GLXWindow)),&result,sizeof(GLXWindow)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDestroyWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXWindow arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXDestroyWindow",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDestroyWindow" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDestroyWindow" "', argument " "2"" of type '" "GLXWindow""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXDestroyWindow" "', argument " "2"" of type '" "GLXWindow""'");
+    } else {
+      arg2 = *((GLXWindow *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXDestroyWindow(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreatePixmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  Pixmap arg3 ;
+  int *arg4 = (int *) 0 ;
+  GLXPixmap result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXCreatePixmap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreatePixmap" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreatePixmap" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Pixmap,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXCreatePixmap" "', argument " "3"" of type '" "Pixmap""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXCreatePixmap" "', argument " "3"" of type '" "Pixmap""'");
+    } else {
+      arg3 = *((Pixmap *)(argp3));
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXCreatePixmap(arg1,arg2,arg3,(int const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXPixmap *)memcpy((GLXPixmap *)malloc(sizeof(GLXPixmap)),&result,sizeof(GLXPixmap)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDestroyPixmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXPixmap arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXDestroyPixmap",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDestroyPixmap" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDestroyPixmap" "', argument " "2"" of type '" "GLXPixmap""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXDestroyPixmap" "', argument " "2"" of type '" "GLXPixmap""'");
+    } else {
+      arg2 = *((GLXPixmap *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXDestroyPixmap(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreatePbuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  int *arg3 = (int *) 0 ;
+  GLXPbuffer result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXCreatePbuffer",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreatePbuffer" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreatePbuffer" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXCreatePbuffer(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXPbuffer *)memcpy((GLXPbuffer *)malloc(sizeof(GLXPbuffer)),&result,sizeof(GLXPbuffer)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDestroyPbuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXPbuffer arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXDestroyPbuffer",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDestroyPbuffer" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDestroyPbuffer" "', argument " "2"" of type '" "GLXPbuffer""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXDestroyPbuffer" "', argument " "2"" of type '" "GLXPbuffer""'");
+    } else {
+      arg2 = *((GLXPbuffer *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXDestroyPbuffer(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryDrawable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int arg3 ;
+  unsigned int *arg4 = (unsigned int *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXQueryDrawable",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryDrawable" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXQueryDrawable" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXQueryDrawable" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXQueryDrawable" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "glXQueryDrawable" "', argument " "4"" of type '" "unsigned int *""'"); 
+  }
+  arg4 = (unsigned int *)(argp4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXQueryDrawable(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXCreateNewContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXFBConfig arg2 = (GLXFBConfig) 0 ;
+  int arg3 ;
+  GLXContext arg4 = (GLXContext) 0 ;
+  Bool arg5 ;
+  GLXContext result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glXCreateNewContext",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXCreateNewContext" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXFBConfigRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXCreateNewContext" "', argument " "2"" of type '" "GLXFBConfig""'"); 
+  }
+  arg2 = (GLXFBConfig)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXCreateNewContext" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "glXCreateNewContext" "', argument " "4"" of type '" "GLXContext""'"); 
+  }
+  arg4 = (GLXContext)(argp4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glXCreateNewContext" "', argument " "5"" of type '" "Bool""'");
+  } 
+  arg5 = (Bool)(val5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXContext)glXCreateNewContext(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXMakeContextCurrent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  GLXDrawable arg3 ;
+  GLXContext arg4 = (GLXContext) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXMakeContextCurrent",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXMakeContextCurrent" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXMakeContextCurrent" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXMakeContextCurrent" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXMakeContextCurrent" "', argument " "3"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXMakeContextCurrent" "', argument " "3"" of type '" "GLXDrawable""'");
+    } else {
+      arg3 = *((GLXDrawable *)(argp3));
+    }
+  }
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "glXMakeContextCurrent" "', argument " "4"" of type '" "GLXContext""'"); 
+  }
+  arg4 = (GLXContext)(argp4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXMakeContextCurrent(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetCurrentReadDrawable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXDrawable result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXGetCurrentReadDrawable")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = glXGetCurrentReadDrawable();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj((GLXDrawable *)memcpy((GLXDrawable *)malloc(sizeof(GLXDrawable)),&result,sizeof(GLXDrawable)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryContext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXContext arg2 = (GLXContext) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXQueryContext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryContext" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p___GLXcontextRec, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXQueryContext" "', argument " "2"" of type '" "GLXContext""'"); 
+  }
+  arg2 = (GLXContext)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXQueryContext" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXQueryContext(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXSelectEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  unsigned long arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  unsigned long val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXSelectEvent",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXSelectEvent" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXSelectEvent" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXSelectEvent" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_unsigned_SS_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXSelectEvent" "', argument " "3"" of type '" "unsigned long""'");
+  } 
+  arg3 = (unsigned long)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXSelectEvent(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetSelectedEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  unsigned long *arg3 = (unsigned long *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXGetSelectedEvent",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetSelectedEvent" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXGetSelectedEvent" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXGetSelectedEvent" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXGetSelectedEvent" "', argument " "3"" of type '" "unsigned long *""'"); 
+  }
+  arg3 = (unsigned long *)(argp3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXGetSelectedEvent(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetProcAddress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLubyte *arg1 = (GLubyte *) 0 ;
+  void (*result)(void) = 0 ;
+  PyArrayObject *array1 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glXGetProcAddress",&obj0)) SWIG_fail;
+  {
+    if (checkArgumentsInCWrapper) 
+    {
+      if (isContiguosBuffer((PyObject*)obj0))
+      {
+        int buffer_len;
+        array1 = NULL;
+        if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+        return NULL;
+        if (! arg1) return PyErr_Format( PyExc_ValueError,
+          "NULL buffer not accepted");
+      }
+      else
+      {
+        bufferWithCheck(obj0, &array1, "GLubyte", 0);
+        if (! array1) return NULL;
+        arg1 = (GLubyte *)array1->data;
+      }
+      /****
+          if (array1)
+          printf ("Array refcnt 1: %d\n", (((PyObject *)array1)->ob_refcnt);
+          ****/
+    }
+    else
+    {
+      int buffer_len;
+      array1 = NULL;
+      if (PyObject_AsReadBuffer( obj0, (const void**)&arg1, &buffer_len))
+      return NULL;
+      if (! arg1) return PyErr_Format( PyExc_ValueError,
+        "NULL buffer not accepted");
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (void (*)(void))glXGetProcAddress((unsigned char const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_void__void);
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return resultobj;
+fail:
+  {
+    if (array1)
+    {
+      Py_DECREF(array1);
+    }
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXAllocateMemoryNV(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLsizei arg1 ;
+  GLfloat arg2 ;
+  GLfloat arg3 ;
+  GLfloat arg4 ;
+  void *result = 0 ;
+  long val1 ;
+  int ecode1 = 0 ;
+  float val2 ;
+  int ecode2 = 0 ;
+  float val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXAllocateMemoryNV",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_long(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glXAllocateMemoryNV" "', argument " "1"" of type '" "GLsizei""'");
+  } 
+  arg1 = (GLsizei)(val1);
+  ecode2 = SWIG_AsVal_float(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXAllocateMemoryNV" "', argument " "2"" of type '" "GLfloat""'");
+  } 
+  arg2 = (GLfloat)(val2);
+  ecode3 = SWIG_AsVal_float(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXAllocateMemoryNV" "', argument " "3"" of type '" "GLfloat""'");
+  } 
+  arg3 = (GLfloat)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glXAllocateMemoryNV" "', argument " "4"" of type '" "GLfloat""'");
+  } 
+  arg4 = (GLfloat)(val4);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (void *)glXAllocateMemoryNV(arg1,arg2,arg3,arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXFreeMemoryNV(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLvoid *arg1 = (GLvoid *) 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glXFreeMemoryNV",&obj0)) SWIG_fail;
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj0, (void**)&arg1, &buffer_len))
+    return NULL;
+    if (! arg1) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXFreeMemoryNV(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXAllocateMemoryMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  size_t arg3 ;
+  float arg4 ;
+  float arg5 ;
+  float arg6 ;
+  void *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  size_t val3 ;
+  int ecode3 = 0 ;
+  float val4 ;
+  int ecode4 = 0 ;
+  float val5 ;
+  int ecode5 = 0 ;
+  float val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:glXAllocateMemoryMESA",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXAllocateMemoryMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXAllocateMemoryMESA" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXAllocateMemoryMESA" "', argument " "3"" of type '" "size_t""'");
+  } 
+  arg3 = (size_t)(val3);
+  ecode4 = SWIG_AsVal_float(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "glXAllocateMemoryMESA" "', argument " "4"" of type '" "float""'");
+  } 
+  arg4 = (float)(val4);
+  ecode5 = SWIG_AsVal_float(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "glXAllocateMemoryMESA" "', argument " "5"" of type '" "float""'");
+  } 
+  arg5 = (float)(val5);
+  ecode6 = SWIG_AsVal_float(obj5, &val6);
+  if (!SWIG_IsOK(ecode6)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "glXAllocateMemoryMESA" "', argument " "6"" of type '" "float""'");
+  } 
+  arg6 = (float)(val6);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (void *)glXAllocateMemoryMESA(arg1,arg2,arg3,arg4,arg5,arg6);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXFreeMemoryMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  void *arg3 = (void *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXFreeMemoryMESA",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXFreeMemoryMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXFreeMemoryMESA" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXFreeMemoryMESA" "', argument " "3"" of type '" "void *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXFreeMemoryMESA(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetMemoryOffsetMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int arg2 ;
+  void *arg3 = (void *) 0 ;
+  GLuint result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXGetMemoryOffsetMESA",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetMemoryOffsetMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "glXGetMemoryOffsetMESA" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXGetMemoryOffsetMESA" "', argument " "3"" of type '" "void const *""'"); 
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLuint)glXGetMemoryOffsetMESA(arg1,arg2,(void const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXBindTexImageARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXPbuffer arg2 ;
+  int arg3 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXBindTexImageARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXBindTexImageARB" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXBindTexImageARB" "', argument " "2"" of type '" "GLXPbuffer""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXBindTexImageARB" "', argument " "2"" of type '" "GLXPbuffer""'");
+    } else {
+      arg2 = *((GLXPbuffer *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXBindTexImageARB" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXBindTexImageARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXReleaseTexImageARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXPbuffer arg2 ;
+  int arg3 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXReleaseTexImageARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXReleaseTexImageARB" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXReleaseTexImageARB" "', argument " "2"" of type '" "GLXPbuffer""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXReleaseTexImageARB" "', argument " "2"" of type '" "GLXPbuffer""'");
+    } else {
+      arg2 = *((GLXPbuffer *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXReleaseTexImageARB" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXReleaseTexImageARB(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXDrawableAttribARB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int *arg3 = (int *) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXDrawableAttribARB",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXDrawableAttribARB" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXDrawableAttribARB" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXDrawableAttribARB" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj2, (void**)&arg3, &buffer_len))
+    return NULL;
+    if (! arg3) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Bool)glXDrawableAttribARB(arg1,arg2,(int const *)arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetFrameUsageMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  float *arg3 = (float *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXGetFrameUsageMESA",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXGetFrameUsageMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXGetFrameUsageMESA" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXGetFrameUsageMESA" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXGetFrameUsageMESA" "', argument " "3"" of type '" "float *""'"); 
+  }
+  arg3 = (float *)(argp3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXGetFrameUsageMESA(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXBeginFrameTrackingMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXBeginFrameTrackingMESA",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXBeginFrameTrackingMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXBeginFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXBeginFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXBeginFrameTrackingMESA(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXEndFrameTrackingMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:glXEndFrameTrackingMESA",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXEndFrameTrackingMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXEndFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXEndFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXEndFrameTrackingMESA(arg1,arg2);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXQueryFrameTrackingMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int64_t *arg3 = (int64_t *) 0 ;
+  int64_t *arg4 = (int64_t *) 0 ;
+  float *arg5 = (float *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:glXQueryFrameTrackingMESA",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXQueryFrameTrackingMESA" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXQueryFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXQueryFrameTrackingMESA" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int64_t, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "glXQueryFrameTrackingMESA" "', argument " "3"" of type '" "int64_t *""'"); 
+  }
+  arg3 = (int64_t *)(argp3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int64_t, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "glXQueryFrameTrackingMESA" "', argument " "4"" of type '" "int64_t *""'"); 
+  }
+  arg4 = (int64_t *)(argp4);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 |  0 );
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "glXQueryFrameTrackingMESA" "', argument " "5"" of type '" "float *""'"); 
+  }
+  arg5 = (float *)(argp5);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXQueryFrameTrackingMESA(arg1,arg2,arg3,arg4,arg5);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXSwapIntervalMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  unsigned int arg1 ;
+  int result;
+  unsigned int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:glXSwapIntervalMESA",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glXSwapIntervalMESA" "', argument " "1"" of type '" "unsigned int""'");
+  } 
+  arg1 = (unsigned int)(val1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXSwapIntervalMESA(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXGetSwapIntervalMESA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":glXGetSwapIntervalMESA")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)glXGetSwapIntervalMESA();
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXBindTexImageEXT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:glXBindTexImageEXT",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXBindTexImageEXT" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXBindTexImageEXT" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXBindTexImageEXT" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXBindTexImageEXT" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj3, (void**)&arg4, &buffer_len))
+    return NULL;
+    if (! arg4) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXBindTexImageEXT(arg1,arg2,arg3,(int const *)arg4);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glXReleaseTexImageEXT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  GLXDrawable arg2 ;
+  int arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:glXReleaseTexImageEXT",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "glXReleaseTexImageEXT" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "glXReleaseTexImageEXT" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "glXReleaseTexImageEXT" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "glXReleaseTexImageEXT" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    glXReleaseTexImageEXT(arg1,arg2,arg3);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_event_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_event_type_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_event_type_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_event_type_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->event_type = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_event_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_event_type_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_event_type_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->event_type);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_draw_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_draw_type_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_draw_type_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_draw_type_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->draw_type = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_draw_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_draw_type_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_draw_type_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->draw_type);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_serial_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned long arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_serial_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_serial_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_serial_set" "', argument " "2"" of type '" "unsigned long""'");
+  } 
+  arg2 = (unsigned long)(val2);
+  if (arg1) (arg1)->serial = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_serial_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned long result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_serial_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_serial_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (unsigned long) ((arg1)->serial);
+  resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_send_event_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  Bool arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_send_event_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_send_event_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_send_event_set" "', argument " "2"" of type '" "Bool""'");
+  } 
+  arg2 = (Bool)(val2);
+  if (arg1) (arg1)->send_event = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_send_event_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  Bool result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_send_event_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_send_event_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (Bool) ((arg1)->send_event);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_display_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  Display *arg2 = (Display *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_display_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_display_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Display, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GLXPbufferClobberEvent_display_set" "', argument " "2"" of type '" "Display *""'"); 
+  }
+  arg2 = (Display *)(argp2);
+  if (arg1) (arg1)->display = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_display_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  Display *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_display_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_display_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (Display *) ((arg1)->display);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Display, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_drawable_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  GLXDrawable arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_drawable_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_drawable_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_XID,  0 );
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GLXPbufferClobberEvent_drawable_set" "', argument " "2"" of type '" "GLXDrawable""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GLXPbufferClobberEvent_drawable_set" "', argument " "2"" of type '" "GLXDrawable""'");
+    } else {
+      arg2 = *((GLXDrawable *)(argp2));
+    }
+  }
+  if (arg1) (arg1)->drawable = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_drawable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  GLXDrawable result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_drawable_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_drawable_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result =  ((arg1)->drawable);
+  resultobj = SWIG_NewPointerObj((GLXDrawable *)memcpy((GLXDrawable *)malloc(sizeof(GLXDrawable)),&result,sizeof(GLXDrawable)), SWIGTYPE_p_XID, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_buffer_mask_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_buffer_mask_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_buffer_mask_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_buffer_mask_set" "', argument " "2"" of type '" "unsigned int""'");
+  } 
+  arg2 = (unsigned int)(val2);
+  if (arg1) (arg1)->buffer_mask = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_buffer_mask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_buffer_mask_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_buffer_mask_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (unsigned int) ((arg1)->buffer_mask);
+  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_aux_buffer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_aux_buffer_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_aux_buffer_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_aux_buffer_set" "', argument " "2"" of type '" "unsigned int""'");
+  } 
+  arg2 = (unsigned int)(val2);
+  if (arg1) (arg1)->aux_buffer = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_aux_buffer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  unsigned int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_aux_buffer_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_aux_buffer_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (unsigned int) ((arg1)->aux_buffer);
+  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_x_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_x_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_x_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->x = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_x_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_x_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->x);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_y_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_y_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_y_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->y = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_y_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_y_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->y);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_width_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_width_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_width_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_width_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->width = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_width_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_width_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->width);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_height_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_height_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_height_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_height_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->height = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_height_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_height_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->height);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXPbufferClobberEvent_count_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_count_set" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GLXPbufferClobberEvent_count_set" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  if (arg1) (arg1)->count = arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXPbufferClobberEvent_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXPbufferClobberEvent_count_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXPbufferClobberEvent_count_get" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  result = (int) ((arg1)->count);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_GLXPbufferClobberEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":new_GLXPbufferClobberEvent")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXPbufferClobberEvent *)(GLXPbufferClobberEvent *) calloc(1, sizeof(GLXPbufferClobberEvent));
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GLXPbufferClobberEvent, SWIG_POINTER_NEW |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_GLXPbufferClobberEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXPbufferClobberEvent *arg1 = (GLXPbufferClobberEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_GLXPbufferClobberEvent",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GLXPbufferClobberEvent, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GLXPbufferClobberEvent" "', argument " "1"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg1 = (GLXPbufferClobberEvent *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    free((char *) arg1);
+    
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *GLXPbufferClobberEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_GLXPbufferClobberEvent, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_GLXEvent_glxpbufferclobber_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *arg1 = (GLXEvent *) 0 ;
+  GLXPbufferClobberEvent *arg2 = (GLXPbufferClobberEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXEvent_glxpbufferclobber_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p___GLXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXEvent_glxpbufferclobber_set" "', argument " "1"" of type '" "GLXEvent *""'"); 
+  }
+  arg1 = (GLXEvent *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GLXEvent_glxpbufferclobber_set" "', argument " "2"" of type '" "GLXPbufferClobberEvent *""'"); 
+  }
+  arg2 = (GLXPbufferClobberEvent *)(argp2);
+  if (arg1) (arg1)->glxpbufferclobber = *arg2;
+  
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXEvent_glxpbufferclobber_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *arg1 = (GLXEvent *) 0 ;
+  GLXPbufferClobberEvent *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXEvent_glxpbufferclobber_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p___GLXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXEvent_glxpbufferclobber_get" "', argument " "1"" of type '" "GLXEvent *""'"); 
+  }
+  arg1 = (GLXEvent *)(argp1);
+  result = (GLXPbufferClobberEvent *)& ((arg1)->glxpbufferclobber);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GLXPbufferClobberEvent, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXEvent_pad_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *arg1 = (GLXEvent *) 0 ;
+  long *arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:GLXEvent_pad_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p___GLXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXEvent_pad_set" "', argument " "1"" of type '" "GLXEvent *""'"); 
+  }
+  arg1 = (GLXEvent *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GLXEvent_pad_set" "', argument " "2"" of type '" "long [24]""'"); 
+  } 
+  arg2 = (long *)(argp2);
+  {
+    if (arg2) {
+      size_t ii = 0;
+      for (; ii < (size_t)24; ++ii) arg1->pad[ii] = arg2[ii];
+    } else {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""pad""' of type '""long [24]""'");
+    }
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_GLXEvent_pad_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *arg1 = (GLXEvent *) 0 ;
+  long *result = 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:GLXEvent_pad_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p___GLXEvent, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GLXEvent_pad_get" "', argument " "1"" of type '" "GLXEvent *""'"); 
+  }
+  arg1 = (GLXEvent *)(argp1);
+  result = (long *)(long *) ((arg1)->pad);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_GLXEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":new_GLXEvent")) SWIG_fail;
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (GLXEvent *)(GLXEvent *) calloc(1, sizeof(GLXEvent));
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___GLXEvent, SWIG_POINTER_NEW |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_GLXEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  GLXEvent *arg1 = (GLXEvent *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_GLXEvent",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p___GLXEvent, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GLXEvent" "', argument " "1"" of type '" "GLXEvent *""'"); 
+  }
+  arg1 = (GLXEvent *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    free((char *) arg1);
+    
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *GLXEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p___GLXEvent, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_XOpenDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  Display *result = 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:XOpenDisplay",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XOpenDisplay" "', argument " "1"" of type '" "char const *""'");
+  }
+  arg1 = (char *)(buf1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (Display *)XOpenDisplay((char const *)arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Display, 0 |  0 );
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_XCloseDisplay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Display *arg1 = (Display *) 0 ;
+  int result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:XCloseDisplay",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Display, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XCloseDisplay" "', argument " "1"" of type '" "Display *""'"); 
+  }
+  arg1 = (Display *)(argp1);
+  {
+    GLenum errcode;
+    
+    if (s_opengltk->pythread)
+    {
+      printf ("pythread \n");
+      if (PyThreadState_Get() != s_opengltk->pythread)
+      return PyErr_Format( PyExc_RuntimeError,
+        "OpenGL is attached to a different thread");
+      PyEval_ReleaseThread( s_opengltk->pythread);
+    }
+    result = (int)XCloseDisplay(arg1);
+    if (s_opengltk->checkerror)
+    
+    {
+      errcode = glGetError();
+      if (s_opengltk->pythread && s_opengltk->threadunlocked)
+      PyEval_RestoreThread( s_opengltk->pythread);
+      
+      
+      
+      
+      if (errcode)
+      
+      {
+        PyObject_t errret;
+        errret = s_opengltk->processerror( errcode);
+        if (errret) Py_DECREF( errret);
+        else return NULL;
+      }
+    }
+    else if (s_opengltk->pythread && s_opengltk->threadunlocked)
+    PyEval_RestoreThread( s_opengltk->pythread);
+  }
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"glXChooseVisual", _wrap_glXChooseVisual, METH_VARARGS, NULL},
+	 { (char *)"glXCreateContext", _wrap_glXCreateContext, METH_VARARGS, NULL},
+	 { (char *)"glXDestroyContext", _wrap_glXDestroyContext, METH_VARARGS, NULL},
+	 { (char *)"glXMakeCurrent", _wrap_glXMakeCurrent, METH_VARARGS, NULL},
+	 { (char *)"glXCopyContext", _wrap_glXCopyContext, METH_VARARGS, NULL},
+	 { (char *)"glXSwapBuffers", _wrap_glXSwapBuffers, METH_VARARGS, NULL},
+	 { (char *)"glXCreateGLXPixmap", _wrap_glXCreateGLXPixmap, METH_VARARGS, NULL},
+	 { (char *)"glXDestroyGLXPixmap", _wrap_glXDestroyGLXPixmap, METH_VARARGS, NULL},
+	 { (char *)"glXQueryExtension", _wrap_glXQueryExtension, METH_VARARGS, NULL},
+	 { (char *)"glXQueryVersion", _wrap_glXQueryVersion, METH_VARARGS, NULL},
+	 { (char *)"glXIsDirect", _wrap_glXIsDirect, METH_VARARGS, NULL},
+	 { (char *)"glXGetConfig", _wrap_glXGetConfig, METH_VARARGS, NULL},
+	 { (char *)"glXGetCurrentContext", _wrap_glXGetCurrentContext, METH_VARARGS, NULL},
+	 { (char *)"glXGetCurrentDrawable", _wrap_glXGetCurrentDrawable, METH_VARARGS, NULL},
+	 { (char *)"glXWaitGL", _wrap_glXWaitGL, METH_VARARGS, NULL},
+	 { (char *)"glXWaitX", _wrap_glXWaitX, METH_VARARGS, NULL},
+	 { (char *)"glXUseXFont", _wrap_glXUseXFont, METH_VARARGS, NULL},
+	 { (char *)"glXQueryExtensionsString", _wrap_glXQueryExtensionsString, METH_VARARGS, NULL},
+	 { (char *)"glXQueryServerString", _wrap_glXQueryServerString, METH_VARARGS, NULL},
+	 { (char *)"glXGetClientString", _wrap_glXGetClientString, METH_VARARGS, NULL},
+	 { (char *)"glXGetCurrentDisplay", _wrap_glXGetCurrentDisplay, METH_VARARGS, NULL},
+	 { (char *)"glXChooseFBConfig", _wrap_glXChooseFBConfig, METH_VARARGS, NULL},
+	 { (char *)"glXGetFBConfigAttrib", _wrap_glXGetFBConfigAttrib, METH_VARARGS, NULL},
+	 { (char *)"glXGetFBConfigs", _wrap_glXGetFBConfigs, METH_VARARGS, NULL},
+	 { (char *)"glXGetVisualFromFBConfig", _wrap_glXGetVisualFromFBConfig, METH_VARARGS, NULL},
+	 { (char *)"glXCreateWindow", _wrap_glXCreateWindow, METH_VARARGS, NULL},
+	 { (char *)"glXDestroyWindow", _wrap_glXDestroyWindow, METH_VARARGS, NULL},
+	 { (char *)"glXCreatePixmap", _wrap_glXCreatePixmap, METH_VARARGS, NULL},
+	 { (char *)"glXDestroyPixmap", _wrap_glXDestroyPixmap, METH_VARARGS, NULL},
+	 { (char *)"glXCreatePbuffer", _wrap_glXCreatePbuffer, METH_VARARGS, NULL},
+	 { (char *)"glXDestroyPbuffer", _wrap_glXDestroyPbuffer, METH_VARARGS, NULL},
+	 { (char *)"glXQueryDrawable", _wrap_glXQueryDrawable, METH_VARARGS, NULL},
+	 { (char *)"glXCreateNewContext", _wrap_glXCreateNewContext, METH_VARARGS, NULL},
+	 { (char *)"glXMakeContextCurrent", _wrap_glXMakeContextCurrent, METH_VARARGS, NULL},
+	 { (char *)"glXGetCurrentReadDrawable", _wrap_glXGetCurrentReadDrawable, METH_VARARGS, NULL},
+	 { (char *)"glXQueryContext", _wrap_glXQueryContext, METH_VARARGS, NULL},
+	 { (char *)"glXSelectEvent", _wrap_glXSelectEvent, METH_VARARGS, NULL},
+	 { (char *)"glXGetSelectedEvent", _wrap_glXGetSelectedEvent, METH_VARARGS, NULL},
+	 { (char *)"glXGetProcAddress", _wrap_glXGetProcAddress, METH_VARARGS, NULL},
+	 { (char *)"glXAllocateMemoryNV", _wrap_glXAllocateMemoryNV, METH_VARARGS, NULL},
+	 { (char *)"glXFreeMemoryNV", _wrap_glXFreeMemoryNV, METH_VARARGS, NULL},
+	 { (char *)"glXAllocateMemoryMESA", _wrap_glXAllocateMemoryMESA, METH_VARARGS, NULL},
+	 { (char *)"glXFreeMemoryMESA", _wrap_glXFreeMemoryMESA, METH_VARARGS, NULL},
+	 { (char *)"glXGetMemoryOffsetMESA", _wrap_glXGetMemoryOffsetMESA, METH_VARARGS, NULL},
+	 { (char *)"glXBindTexImageARB", _wrap_glXBindTexImageARB, METH_VARARGS, NULL},
+	 { (char *)"glXReleaseTexImageARB", _wrap_glXReleaseTexImageARB, METH_VARARGS, NULL},
+	 { (char *)"glXDrawableAttribARB", _wrap_glXDrawableAttribARB, METH_VARARGS, NULL},
+	 { (char *)"glXGetFrameUsageMESA", _wrap_glXGetFrameUsageMESA, METH_VARARGS, NULL},
+	 { (char *)"glXBeginFrameTrackingMESA", _wrap_glXBeginFrameTrackingMESA, METH_VARARGS, NULL},
+	 { (char *)"glXEndFrameTrackingMESA", _wrap_glXEndFrameTrackingMESA, METH_VARARGS, NULL},
+	 { (char *)"glXQueryFrameTrackingMESA", _wrap_glXQueryFrameTrackingMESA, METH_VARARGS, NULL},
+	 { (char *)"glXSwapIntervalMESA", _wrap_glXSwapIntervalMESA, METH_VARARGS, NULL},
+	 { (char *)"glXGetSwapIntervalMESA", _wrap_glXGetSwapIntervalMESA, METH_VARARGS, NULL},
+	 { (char *)"glXBindTexImageEXT", _wrap_glXBindTexImageEXT, METH_VARARGS, NULL},
+	 { (char *)"glXReleaseTexImageEXT", _wrap_glXReleaseTexImageEXT, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_event_type_set", _wrap_GLXPbufferClobberEvent_event_type_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_event_type_get", _wrap_GLXPbufferClobberEvent_event_type_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_draw_type_set", _wrap_GLXPbufferClobberEvent_draw_type_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_draw_type_get", _wrap_GLXPbufferClobberEvent_draw_type_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_serial_set", _wrap_GLXPbufferClobberEvent_serial_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_serial_get", _wrap_GLXPbufferClobberEvent_serial_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_send_event_set", _wrap_GLXPbufferClobberEvent_send_event_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_send_event_get", _wrap_GLXPbufferClobberEvent_send_event_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_display_set", _wrap_GLXPbufferClobberEvent_display_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_display_get", _wrap_GLXPbufferClobberEvent_display_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_drawable_set", _wrap_GLXPbufferClobberEvent_drawable_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_drawable_get", _wrap_GLXPbufferClobberEvent_drawable_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_buffer_mask_set", _wrap_GLXPbufferClobberEvent_buffer_mask_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_buffer_mask_get", _wrap_GLXPbufferClobberEvent_buffer_mask_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_aux_buffer_set", _wrap_GLXPbufferClobberEvent_aux_buffer_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_aux_buffer_get", _wrap_GLXPbufferClobberEvent_aux_buffer_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_x_set", _wrap_GLXPbufferClobberEvent_x_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_x_get", _wrap_GLXPbufferClobberEvent_x_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_y_set", _wrap_GLXPbufferClobberEvent_y_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_y_get", _wrap_GLXPbufferClobberEvent_y_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_width_set", _wrap_GLXPbufferClobberEvent_width_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_width_get", _wrap_GLXPbufferClobberEvent_width_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_height_set", _wrap_GLXPbufferClobberEvent_height_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_height_get", _wrap_GLXPbufferClobberEvent_height_get, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_count_set", _wrap_GLXPbufferClobberEvent_count_set, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_count_get", _wrap_GLXPbufferClobberEvent_count_get, METH_VARARGS, NULL},
+	 { (char *)"new_GLXPbufferClobberEvent", _wrap_new_GLXPbufferClobberEvent, METH_VARARGS, NULL},
+	 { (char *)"delete_GLXPbufferClobberEvent", _wrap_delete_GLXPbufferClobberEvent, METH_VARARGS, NULL},
+	 { (char *)"GLXPbufferClobberEvent_swigregister", GLXPbufferClobberEvent_swigregister, METH_VARARGS, NULL},
+	 { (char *)"GLXEvent_glxpbufferclobber_set", _wrap_GLXEvent_glxpbufferclobber_set, METH_VARARGS, NULL},
+	 { (char *)"GLXEvent_glxpbufferclobber_get", _wrap_GLXEvent_glxpbufferclobber_get, METH_VARARGS, NULL},
+	 { (char *)"GLXEvent_pad_set", _wrap_GLXEvent_pad_set, METH_VARARGS, NULL},
+	 { (char *)"GLXEvent_pad_get", _wrap_GLXEvent_pad_get, METH_VARARGS, NULL},
+	 { (char *)"new_GLXEvent", _wrap_new_GLXEvent, METH_VARARGS, NULL},
+	 { (char *)"delete_GLXEvent", _wrap_delete_GLXEvent, METH_VARARGS, NULL},
+	 { (char *)"GLXEvent_swigregister", GLXEvent_swigregister, METH_VARARGS, NULL},
+	 { (char *)"XOpenDisplay", _wrap_XOpenDisplay, METH_VARARGS, NULL},
+	 { (char *)"XCloseDisplay", _wrap_XCloseDisplay, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_Display = {"_p_Display", "Display *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Font = {"_p_Font", "Font *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_GLXPbufferClobberEvent = {"_p_GLXPbufferClobberEvent", "GLXPbufferClobberEvent *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Pixmap = {"_p_Pixmap", "Pixmap *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_Window = {"_p_Window", "Window *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_XID = {"_p_XID", "GLXPixmap *|GLXContextID *|GLXWindow *|GLXPbuffer *|XID *|GLXFBConfigID *|GLXDrawable *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_XVisualInfo = {"_p_XVisualInfo", "XVisualInfo *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p___GLXEvent = {"_p___GLXEvent", "union __GLXEvent *|GLXEvent *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p___GLXFBConfigRec = {"_p___GLXFBConfigRec", "struct __GLXFBConfigRec *|GLXFBConfig", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p___GLXcontextRec = {"_p___GLXcontextRec", "struct __GLXcontextRec *|GLXContext", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_double = {"_p_double", "double *|GLclampd *|GLdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_void__void = {"_p_f_void__void", "void (*)(void)", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_float = {"_p_float", "GLclampf *|float *|GLfloat *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "Bool *|int *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "GLsizei *|long *|GLint *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p___GLXFBConfigRec = {"_p_p___GLXFBConfigRec", "GLXFBConfig *|struct __GLXFBConfigRec **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_short = {"_p_short", "short *|GLshort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|GLbyte *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|GLubyte *|GLboolean *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "GLuint *|unsigned long *|GLenum *|GLbitfield *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|GLushort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_void = {"_p_void", "void *|GLvoid *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_Display,
+  &_swigt__p_Font,
+  &_swigt__p_GLXPbufferClobberEvent,
+  &_swigt__p_Pixmap,
+  &_swigt__p_Window,
+  &_swigt__p_XID,
+  &_swigt__p_XVisualInfo,
+  &_swigt__p___GLXEvent,
+  &_swigt__p___GLXFBConfigRec,
+  &_swigt__p___GLXcontextRec,
+  &_swigt__p_char,
+  &_swigt__p_double,
+  &_swigt__p_f_void__void,
+  &_swigt__p_float,
+  &_swigt__p_int,
+  &_swigt__p_int64_t,
+  &_swigt__p_long,
+  &_swigt__p_p___GLXFBConfigRec,
+  &_swigt__p_short,
+  &_swigt__p_signed_char,
+  &_swigt__p_unsigned_char,
+  &_swigt__p_unsigned_int,
+  &_swigt__p_unsigned_long,
+  &_swigt__p_unsigned_short,
+  &_swigt__p_void,
+};
+
+static swig_cast_info _swigc__p_Display[] = {  {&_swigt__p_Display, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Font[] = {  {&_swigt__p_Font, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_GLXPbufferClobberEvent[] = {  {&_swigt__p_GLXPbufferClobberEvent, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Pixmap[] = {  {&_swigt__p_Pixmap, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_Window[] = {  {&_swigt__p_Window, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_XID[] = {  {&_swigt__p_XID, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_XVisualInfo[] = {  {&_swigt__p_XVisualInfo, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p___GLXEvent[] = {  {&_swigt__p___GLXEvent, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p___GLXFBConfigRec[] = {  {&_swigt__p___GLXFBConfigRec, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p___GLXcontextRec[] = {  {&_swigt__p___GLXcontextRec, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_void__void[] = {  {&_swigt__p_f_void__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int64_t[] = {  {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p___GLXFBConfigRec[] = {  {&_swigt__p_p___GLXFBConfigRec, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_Display,
+  _swigc__p_Font,
+  _swigc__p_GLXPbufferClobberEvent,
+  _swigc__p_Pixmap,
+  _swigc__p_Window,
+  _swigc__p_XID,
+  _swigc__p_XVisualInfo,
+  _swigc__p___GLXEvent,
+  _swigc__p___GLXFBConfigRec,
+  _swigc__p___GLXcontextRec,
+  _swigc__p_char,
+  _swigc__p_double,
+  _swigc__p_f_void__void,
+  _swigc__p_float,
+  _swigc__p_int,
+  _swigc__p_int64_t,
+  _swigc__p_long,
+  _swigc__p_p___GLXFBConfigRec,
+  _swigc__p_short,
+  _swigc__p_signed_char,
+  _swigc__p_unsigned_char,
+  _swigc__p_unsigned_int,
+  _swigc__p_unsigned_long,
+  _swigc__p_unsigned_short,
+  _swigc__p_void,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+    return PyString_FromString("<Swig global variables>");
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar  *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", PyString_AsString(str));
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;  
+    if (!type_init) {
+      const PyTypeObject tmp
+      = {
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* Number of items in variable part (ob_size) */
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc)swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      varlink_type.ob_type = &PyType_Type;
+      type_init = 1;
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          size_t shift = (ci->ptype) - types;
+          swig_type_info *ty = types_initial[shift];
+          size_t ldoc = (c - methods[i].ml_doc);
+          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+          char *ndoc = (char*)malloc(ldoc + lptr + 10);
+          if (ndoc) {
+            char *buff = ndoc;
+            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+            if (ptr) {
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+SWIGEXPORT void SWIG_init(void) {
+  PyObject *m, *d;
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+  d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  
+  
+  import_array(); /* load the Numeric PyCObjects */
+  
+  PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"checkArgumentsInCWrapper",Swig_var_checkArgumentsInCWrapper_get, Swig_var_checkArgumentsInCWrapper_set);
+  
+  s_opengltk = PypImport_ModuleCobjAttr( "opengltk.extent._utillib",
+    "opengltk_export");
+  if (NOT s_opengltk) return;
+  s_opengltk->checkerror = 1;
+  
+  SWIG_Python_SetConstant(d, "GLX_VERSION_1_1",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_VERSION_1_2",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_VERSION_1_3",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_VERSION_1_4",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_EXTENSION_NAME",SWIG_FromCharPtr("GLX"));
+  SWIG_Python_SetConstant(d, "GLX_USE_GL",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_BUFFER_SIZE",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "GLX_LEVEL",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "GLX_RGBA",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "GLX_DOUBLEBUFFER",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "GLX_STEREO",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "GLX_AUX_BUFFERS",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "GLX_RED_SIZE",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "GLX_GREEN_SIZE",SWIG_From_int((int)(9)));
+  SWIG_Python_SetConstant(d, "GLX_BLUE_SIZE",SWIG_From_int((int)(10)));
+  SWIG_Python_SetConstant(d, "GLX_ALPHA_SIZE",SWIG_From_int((int)(11)));
+  SWIG_Python_SetConstant(d, "GLX_DEPTH_SIZE",SWIG_From_int((int)(12)));
+  SWIG_Python_SetConstant(d, "GLX_STENCIL_SIZE",SWIG_From_int((int)(13)));
+  SWIG_Python_SetConstant(d, "GLX_ACCUM_RED_SIZE",SWIG_From_int((int)(14)));
+  SWIG_Python_SetConstant(d, "GLX_ACCUM_GREEN_SIZE",SWIG_From_int((int)(15)));
+  SWIG_Python_SetConstant(d, "GLX_ACCUM_BLUE_SIZE",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "GLX_ACCUM_ALPHA_SIZE",SWIG_From_int((int)(17)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_SCREEN",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_ATTRIBUTE",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "GLX_NO_EXTENSION",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_VISUAL",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_CONTEXT",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_VALUE",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "GLX_BAD_ENUM",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "GLX_VENDOR",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_VERSION",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "GLX_EXTENSIONS",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "GLX_CONFIG_CAVEAT",SWIG_From_int((int)(0x20)));
+  SWIG_Python_SetConstant(d, "GLX_DONT_CARE",SWIG_From_int((int)(0xFFFFFFFF)));
+  SWIG_Python_SetConstant(d, "GLX_X_VISUAL_TYPE",SWIG_From_int((int)(0x22)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_TYPE",SWIG_From_int((int)(0x23)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_INDEX_VALUE",SWIG_From_int((int)(0x24)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_RED_VALUE",SWIG_From_int((int)(0x25)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_GREEN_VALUE",SWIG_From_int((int)(0x26)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_BLUE_VALUE",SWIG_From_int((int)(0x27)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_ALPHA_VALUE",SWIG_From_int((int)(0x28)));
+  SWIG_Python_SetConstant(d, "GLX_WINDOW_BIT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GLX_PIXMAP_BIT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GLX_PBUFFER_BIT",SWIG_From_int((int)(0x00000004)));
+  SWIG_Python_SetConstant(d, "GLX_AUX_BUFFERS_BIT",SWIG_From_int((int)(0x00000010)));
+  SWIG_Python_SetConstant(d, "GLX_FRONT_LEFT_BUFFER_BIT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GLX_FRONT_RIGHT_BUFFER_BIT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GLX_BACK_LEFT_BUFFER_BIT",SWIG_From_int((int)(0x00000004)));
+  SWIG_Python_SetConstant(d, "GLX_BACK_RIGHT_BUFFER_BIT",SWIG_From_int((int)(0x00000008)));
+  SWIG_Python_SetConstant(d, "GLX_DEPTH_BUFFER_BIT",SWIG_From_int((int)(0x00000020)));
+  SWIG_Python_SetConstant(d, "GLX_STENCIL_BUFFER_BIT",SWIG_From_int((int)(0x00000040)));
+  SWIG_Python_SetConstant(d, "GLX_ACCUM_BUFFER_BIT",SWIG_From_int((int)(0x00000080)));
+  SWIG_Python_SetConstant(d, "GLX_NONE",SWIG_From_int((int)(0x8000)));
+  SWIG_Python_SetConstant(d, "GLX_SLOW_CONFIG",SWIG_From_int((int)(0x8001)));
+  SWIG_Python_SetConstant(d, "GLX_TRUE_COLOR",SWIG_From_int((int)(0x8002)));
+  SWIG_Python_SetConstant(d, "GLX_DIRECT_COLOR",SWIG_From_int((int)(0x8003)));
+  SWIG_Python_SetConstant(d, "GLX_PSEUDO_COLOR",SWIG_From_int((int)(0x8004)));
+  SWIG_Python_SetConstant(d, "GLX_STATIC_COLOR",SWIG_From_int((int)(0x8005)));
+  SWIG_Python_SetConstant(d, "GLX_GRAY_SCALE",SWIG_From_int((int)(0x8006)));
+  SWIG_Python_SetConstant(d, "GLX_STATIC_GRAY",SWIG_From_int((int)(0x8007)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_RGB",SWIG_From_int((int)(0x8008)));
+  SWIG_Python_SetConstant(d, "GLX_TRANSPARENT_INDEX",SWIG_From_int((int)(0x8009)));
+  SWIG_Python_SetConstant(d, "GLX_VISUAL_ID",SWIG_From_int((int)(0x800B)));
+  SWIG_Python_SetConstant(d, "GLX_SCREEN",SWIG_From_int((int)(0x800C)));
+  SWIG_Python_SetConstant(d, "GLX_NON_CONFORMANT_CONFIG",SWIG_From_int((int)(0x800D)));
+  SWIG_Python_SetConstant(d, "GLX_DRAWABLE_TYPE",SWIG_From_int((int)(0x8010)));
+  SWIG_Python_SetConstant(d, "GLX_RENDER_TYPE",SWIG_From_int((int)(0x8011)));
+  SWIG_Python_SetConstant(d, "GLX_X_RENDERABLE",SWIG_From_int((int)(0x8012)));
+  SWIG_Python_SetConstant(d, "GLX_FBCONFIG_ID",SWIG_From_int((int)(0x8013)));
+  SWIG_Python_SetConstant(d, "GLX_RGBA_TYPE",SWIG_From_int((int)(0x8014)));
+  SWIG_Python_SetConstant(d, "GLX_COLOR_INDEX_TYPE",SWIG_From_int((int)(0x8015)));
+  SWIG_Python_SetConstant(d, "GLX_MAX_PBUFFER_WIDTH",SWIG_From_int((int)(0x8016)));
+  SWIG_Python_SetConstant(d, "GLX_MAX_PBUFFER_HEIGHT",SWIG_From_int((int)(0x8017)));
+  SWIG_Python_SetConstant(d, "GLX_MAX_PBUFFER_PIXELS",SWIG_From_int((int)(0x8018)));
+  SWIG_Python_SetConstant(d, "GLX_PRESERVED_CONTENTS",SWIG_From_int((int)(0x801B)));
+  SWIG_Python_SetConstant(d, "GLX_LARGEST_PBUFFER",SWIG_From_int((int)(0x801C)));
+  SWIG_Python_SetConstant(d, "GLX_WIDTH",SWIG_From_int((int)(0x801D)));
+  SWIG_Python_SetConstant(d, "GLX_HEIGHT",SWIG_From_int((int)(0x801E)));
+  SWIG_Python_SetConstant(d, "GLX_EVENT_MASK",SWIG_From_int((int)(0x801F)));
+  SWIG_Python_SetConstant(d, "GLX_DAMAGED",SWIG_From_int((int)(0x8020)));
+  SWIG_Python_SetConstant(d, "GLX_SAVED",SWIG_From_int((int)(0x8021)));
+  SWIG_Python_SetConstant(d, "GLX_WINDOW",SWIG_From_int((int)(0x8022)));
+  SWIG_Python_SetConstant(d, "GLX_PBUFFER",SWIG_From_int((int)(0x8023)));
+  SWIG_Python_SetConstant(d, "GLX_PBUFFER_HEIGHT",SWIG_From_int((int)(0x8040)));
+  SWIG_Python_SetConstant(d, "GLX_PBUFFER_WIDTH",SWIG_From_int((int)(0x8041)));
+  SWIG_Python_SetConstant(d, "GLX_RGBA_BIT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GLX_COLOR_INDEX_BIT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GLX_PBUFFER_CLOBBER_MASK",SWIG_From_int((int)(0x08000000)));
+  SWIG_Python_SetConstant(d, "GLX_SAMPLE_BUFFERS",SWIG_From_int((int)(0x186a0)));
+  SWIG_Python_SetConstant(d, "GLX_SAMPLES",SWIG_From_int((int)(0x186a1)));
+  SWIG_Python_SetConstant(d, "GLX_MESA_allocate_memory",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_ARB_render_texture",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_NV_float_buffer",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_FLOAT_COMPONENTS_NV",SWIG_From_int((int)(0x20B0)));
+  SWIG_Python_SetConstant(d, "GLX_MESA_swap_frame_usage",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_MESA_swap_control",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_EXT_texture_from_pixmap",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "GLX_BIND_TO_TEXTURE_RGB_EXT",SWIG_From_int((int)(0x20D0)));
+  SWIG_Python_SetConstant(d, "GLX_BIND_TO_TEXTURE_RGBA_EXT",SWIG_From_int((int)(0x20D1)));
+  SWIG_Python_SetConstant(d, "GLX_BIND_TO_MIPMAP_TEXTURE_EXT",SWIG_From_int((int)(0x20D2)));
+  SWIG_Python_SetConstant(d, "GLX_BIND_TO_TEXTURE_TARGETS_EXT",SWIG_From_int((int)(0x20D3)));
+  SWIG_Python_SetConstant(d, "GLX_Y_INVERTED_EXT",SWIG_From_int((int)(0x20D4)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_FORMAT_EXT",SWIG_From_int((int)(0x20D5)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_TARGET_EXT",SWIG_From_int((int)(0x20D6)));
+  SWIG_Python_SetConstant(d, "GLX_MIPMAP_TEXTURE_EXT",SWIG_From_int((int)(0x20D7)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_FORMAT_NONE_EXT",SWIG_From_int((int)(0x20D8)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_FORMAT_RGB_EXT",SWIG_From_int((int)(0x20D9)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_FORMAT_RGBA_EXT",SWIG_From_int((int)(0x20DA)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_1D_BIT_EXT",SWIG_From_int((int)(0x00000001)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_2D_BIT_EXT",SWIG_From_int((int)(0x00000002)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_RECTANGLE_BIT_EXT",SWIG_From_int((int)(0x00000004)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_1D_EXT",SWIG_From_int((int)(0x20DB)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_2D_EXT",SWIG_From_int((int)(0x20DC)));
+  SWIG_Python_SetConstant(d, "GLX_TEXTURE_RECTANGLE_EXT",SWIG_From_int((int)(0x20DD)));
+  SWIG_Python_SetConstant(d, "GLX_FRONT_LEFT_EXT",SWIG_From_int((int)(0x20DE)));
+  SWIG_Python_SetConstant(d, "GLX_FRONT_RIGHT_EXT",SWIG_From_int((int)(0x20DF)));
+  SWIG_Python_SetConstant(d, "GLX_BACK_LEFT_EXT",SWIG_From_int((int)(0x20E0)));
+  SWIG_Python_SetConstant(d, "GLX_BACK_RIGHT_EXT",SWIG_From_int((int)(0x20E1)));
+  SWIG_Python_SetConstant(d, "GLX_FRONT_EXT",SWIG_From_int((int)(0x20DE)));
+  SWIG_Python_SetConstant(d, "GLX_BACK_EXT",SWIG_From_int((int)(0x20E0)));
+  SWIG_Python_SetConstant(d, "GLX_AUX0_EXT",SWIG_From_int((int)(0x20E2)));
+  SWIG_Python_SetConstant(d, "GLX_AUX1_EXT",SWIG_From_int((int)(0x20E3)));
+  SWIG_Python_SetConstant(d, "GLX_AUX2_EXT",SWIG_From_int((int)(0x20E4)));
+  SWIG_Python_SetConstant(d, "GLX_AUX3_EXT",SWIG_From_int((int)(0x20E5)));
+  SWIG_Python_SetConstant(d, "GLX_AUX4_EXT",SWIG_From_int((int)(0x20E6)));
+  SWIG_Python_SetConstant(d, "GLX_AUX5_EXT",SWIG_From_int((int)(0x20E7)));
+  SWIG_Python_SetConstant(d, "GLX_AUX6_EXT",SWIG_From_int((int)(0x20E8)));
+  SWIG_Python_SetConstant(d, "GLX_AUX7_EXT",SWIG_From_int((int)(0x20E9)));
+  SWIG_Python_SetConstant(d, "GLX_AUX8_EXT",SWIG_From_int((int)(0x20EA)));
+  SWIG_Python_SetConstant(d, "GLX_AUX9_EXT",SWIG_From_int((int)(0x20EB)));
+  SWIG_Python_SetConstant(d, "GLXContext_Null",SWIG_NewPointerObj(SWIG_as_voidptr(NULL),SWIGTYPE_p___GLXcontextRec, 0 ));
+}
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib.py
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib.py	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib.py	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,114 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.33
+#
+# Don't modify this file, modify the SWIG interface instead.
+# This file is compatible with both classic and new-style classes.
+
+import _utillib
+import new
+new_instancemethod = new.instancemethod
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'PySwigObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError,name
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+import types
+try:
+    _object = types.ObjectType
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+del types
+
+
+void_void_array_get = _utillib.void_void_array_get
+void_void_dim = _utillib.void_void_dim
+void_void_NULL = _utillib.void_void_NULL
+void_GLenum_array_get = _utillib.void_GLenum_array_get
+void_GLenum_dim = _utillib.void_GLenum_dim
+void_GLenum_NULL = _utillib.void_GLenum_NULL
+void_int_array_get = _utillib.void_int_array_get
+void_int_dim = _utillib.void_int_dim
+void_int_NULL = _utillib.void_int_NULL
+void_int_int_array_get = _utillib.void_int_int_array_get
+void_int_int_dim = _utillib.void_int_int_dim
+void_int_int_NULL = _utillib.void_int_int_NULL
+void_int_int_int_array_get = _utillib.void_int_int_int_array_get
+void_int_int_int_dim = _utillib.void_int_int_int_dim
+void_int_int_int_NULL = _utillib.void_int_int_int_NULL
+void_int_int_int_int_array_get = _utillib.void_int_int_int_int_array_get
+void_int_int_int_int_dim = _utillib.void_int_int_int_int_dim
+void_int_int_int_int_NULL = _utillib.void_int_int_int_int_NULL
+void_unsignedchar_int_int_array_get = _utillib.void_unsignedchar_int_int_array_get
+void_unsignedchar_int_int_dim = _utillib.void_unsignedchar_int_int_dim
+void_unsignedchar_int_int_NULL = _utillib.void_unsignedchar_int_int_NULL
+void_unsignedint_int_int_int_array_get = _utillib.void_unsignedint_int_int_int_array_get
+void_unsignedint_int_int_int_dim = _utillib.void_unsignedint_int_int_int_dim
+void_unsignedint_int_int_int_NULL = _utillib.void_unsignedint_int_int_int_NULL
+void_int_voidstar_array_get = _utillib.void_int_voidstar_array_get
+void_int_voidstar_dim = _utillib.void_int_voidstar_dim
+void_int_voidstar_NULL = _utillib.void_int_voidstar_NULL
+sizeof_GLbitfield = _utillib.sizeof_GLbitfield
+sizeof_GLboolean = _utillib.sizeof_GLboolean
+sizeof_GLbyte = _utillib.sizeof_GLbyte
+sizeof_GLclampd = _utillib.sizeof_GLclampd
+sizeof_GLclampf = _utillib.sizeof_GLclampf
+sizeof_GLdouble = _utillib.sizeof_GLdouble
+sizeof_GLenum = _utillib.sizeof_GLenum
+sizeof_GLfloat = _utillib.sizeof_GLfloat
+sizeof_GLint = _utillib.sizeof_GLint
+sizeof_GLshort = _utillib.sizeof_GLshort
+sizeof_GLsizei = _utillib.sizeof_GLsizei
+sizeof_GLubyte = _utillib.sizeof_GLubyte
+sizeof_GLuint = _utillib.sizeof_GLuint
+sizeof_GLushort = _utillib.sizeof_GLushort
+glCleanRotMat = _utillib.glCleanRotMat
+extractedGlutSolidSphere = _utillib.extractedGlutSolidSphere
+solidCylinder = _utillib.solidCylinder
+namedPoints = _utillib.namedPoints
+glDrawSphereSet = _utillib.glDrawSphereSet
+glDrawIndexedGeom = _utillib.glDrawIndexedGeom
+triangleNormalsPerFace = _utillib.triangleNormalsPerFace
+triangleNormalsPerVertex = _utillib.triangleNormalsPerVertex
+triangleNormalsBoth = _utillib.triangleNormalsBoth
+def glTriangleNormals(vertices, triangles, mode = "PER_FACE" ):
+    if mode == "PER_FACE":
+        return triangleNormalsPerFace(vertices, triangles)
+    elif mode == "PER_VERTEX":
+        return triangleNormalsPerVertex(vertices, triangles)  
+    elif mode == "BOTH":
+        return triangleNormalsBoth(vertices, triangles) 
+
+
+attachCurrentThread = _utillib.attachCurrentThread
+detachCurrentThread = _utillib.detachCurrentThread
+attachedThread = _utillib.attachedThread
+glTrackball = _utillib.glTrackball
+

Added: trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib_wrap.c
===================================================================
--- trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib_wrap.c	                        (rev 0)
+++ trunk/packages/mgltools/opengltk/trunk/opengltk/extent/utillib_wrap.c	2007-12-21 23:31:03 UTC (rev 951)
@@ -0,0 +1,8699 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.33
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic CAPI SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "3"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The swig conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old swig versions, you usually write code as:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit as:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   that seems to be the same, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   requires also to SWIG_ConvertPtr to return new result values, as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   swig errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+
+
+ */
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store inforomation on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/* think of this as a c++ template<> or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty)         \
+  if (ty) {                                             \
+    swig_cast_info *iter = ty->cast;                    \
+    while (iter) {                                      \
+      if (comparison) {                                 \
+        if (iter == ty->cast) return iter;              \
+        /* Move iter to the top of the linked list */   \
+        iter->prev->next = iter->next;                  \
+        if (iter->next)                                 \
+          iter->next->prev = iter->prev;                \
+        iter->next = ty->cast;                          \
+        iter->prev = 0;                                 \
+        if (ty->cast) ty->cast->prev = iter;            \
+        ty->cast = iter;                                \
+        return iter;                                    \
+      }                                                 \
+      iter = iter->next;                                \
+    }                                                   \
+  }                                                     \
+  return 0
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
+}
+
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+  SWIG_TypeCheck_Template(iter->type == from, into);
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_Format(PyExc_RuntimeError, mesg);
+  }
+}
+
+
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, (char *) msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+  PyDict_SetItemString(d, (char*) name, obj);
+  Py_DECREF(obj);                            
+}
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* PySwigClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+} PySwigClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME PySwigClientData * 
+PySwigClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+PySwigClientData_Del(PySwigClientData* data)
+{
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== PySwigObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+} PySwigObject;
+
+SWIGRUNTIME PyObject *
+PySwigObject_long(PySwigObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_format(const char* fmt, PySwigObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
+      PyObject *ofmt = PyString_FromString(fmt);
+      if (ofmt) {
+	res = PyString_Format(ofmt,args);
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_oct(PySwigObject *v)
+{
+  return PySwigObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_hex(PySwigObject *v)
+{
+  return PySwigObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+PySwigObject_repr(PySwigObject *v)
+#else
+PySwigObject_repr(PySwigObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *hex = PySwigObject_hex(v);    
+  PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
+  Py_DECREF(hex);
+  if (v->next) {
+#ifdef METH_NOARGS
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
+#else
+    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
+#endif
+    PyString_ConcatAndDel(&repr,nrep);
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+#ifdef METH_NOARGS
+  PyObject *repr = PySwigObject_repr(v);
+#else
+  PyObject *repr = PySwigObject_repr(v, NULL);
+#endif
+  if (repr) {
+    fputs(PyString_AsString(repr), fp);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_str(PySwigObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    PyString_FromString(result) : 0;
+}
+
+SWIGRUNTIME int
+PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigObject_Check(PyObject *op) {
+  return ((op)->ob_type == PySwigObject_type())
+    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+PySwigObject_dealloc(PyObject *v)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own) {
+    swig_type_info *ty = sobj->ty;
+    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporal object to carry the destroy operation */
+	PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } else {
+      const char *name = SWIG_TypePrettyName(ty);
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
+#endif
+    }
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+PySwigObject_append(PyObject* v, PyObject* next)
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!PySwigObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+PySwigObject_next(PyObject* v)
+#else
+PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_disown(PyObject *v)
+#else
+PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+PySwigObject_acquire(PyObject *v)
+#else
+PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  PySwigObject *sobj = (PySwigObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+PySwigObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      PySwigObject *sobj = (PySwigObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v);
+	} else {
+	  PySwigObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  PySwigObject_acquire(v,args);
+	} else {
+	  PySwigObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+PySwigObject_getattr(PySwigObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+_PySwigObject_type(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods PySwigObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    (binaryfunc)0, /*nb_divide*/
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+    (coercion)0,   /*nb_coerce*/
+    (unaryfunc)PySwigObject_long, /*nb_int*/
+    (unaryfunc)PySwigObject_long, /*nb_long*/
+    (unaryfunc)0,                 /*nb_float*/
+    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
+    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject pyswigobject_type;  
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */
+	(char *)"PySwigObject",		    /* tp_name */
+	sizeof(PySwigObject),		    /* tp_basicsize */
+	0,			            /* tp_itemsize */
+	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
+	(printfunc)PySwigObject_print,	    /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
+#else
+	(getattrfunc)0,			    /* tp_getattr */ 
+#endif
+	(setattrfunc)0,			    /* tp_setattr */ 
+	(cmpfunc)PySwigObject_compare,	    /* tp_compare */ 
+	(reprfunc)PySwigObject_repr,	    /* tp_repr */    
+	&PySwigObject_as_number,	    /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)PySwigObject_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigobject_doc, 	            /* tp_doc */        
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	swigobject_methods,		    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0,	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigobject_type = tmp;
+    pyswigobject_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigobject_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} PySwigPacked;
+
+SWIGRUNTIME int
+PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+PySwigPacked_repr(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_str(PySwigPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return PyString_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return PyString_FromString(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+
+SWIGRUNTIME PyTypeObject*
+PySwigPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+PySwigPacked_Check(PyObject *op) {
+  return ((op)->ob_type == _PySwigPacked_type()) 
+    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+}
+
+SWIGRUNTIME void
+PySwigPacked_dealloc(PyObject *v)
+{
+  if (PySwigPacked_Check(v)) {
+    PySwigPacked *sobj = (PySwigPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+_PySwigPacked_type(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject pyswigpacked_type;
+  static int type_init = 0;  
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */	
+	(char *)"PySwigPacked",		    /* tp_name */	
+	sizeof(PySwigPacked),		    /* tp_basicsize */	
+	0,				    /* tp_itemsize */	
+	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)PySwigPacked_print,	    /* tp_print */   	
+	(getattrfunc)0,			    /* tp_getattr */ 	
+	(setattrfunc)0,			    /* tp_setattr */ 	
+	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
+	(reprfunc)PySwigPacked_repr,	    /* tp_repr */    	
+	0,	                            /* tp_as_number */	
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */	
+	(hashfunc)0,			    /* tp_hash */	
+	(ternaryfunc)0,			    /* tp_call */	
+	(reprfunc)PySwigPacked_str,	    /* tp_str */	
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigpacked_doc, 	            /* tp_doc */
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	0,		                    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0, 	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    pyswigpacked_type = tmp;
+    pyswigpacked_type.ob_type = &PyType_Type;
+    type_init = 1;
+  }
+  return &pyswigpacked_type;
+}
+
+SWIGRUNTIME PyObject *
+PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (PySwigPacked_Check(obj)) {
+    PySwigPacked *sobj = (PySwigPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+  return PyString_FromString("this");
+}
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+SWIGRUNTIME PySwigObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  if (PySwigObject_Check(pyobj)) {
+    return (PySwigObject *) pyobj;
+  } else {
+    PyObject *obj = 0;
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+    if (PyInstance_Check(pyobj)) {
+      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+    } else {
+      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+      } else {
+#ifdef PyWeakref_CheckProxy
+	if (PyWeakref_CheckProxy(pyobj)) {
+	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+	}
+#endif
+	obj = PyObject_GetAttr(pyobj,SWIG_This());
+	if (obj) {
+	  Py_DECREF(obj);
+	} else {
+	  if (PyErr_Occurred()) PyErr_Clear();
+	  return 0;
+	}
+      }
+    }
+#else
+    obj = PyObject_GetAttr(pyobj,SWIG_This());
+    if (obj) {
+      Py_DECREF(obj);
+    } else {
+      if (PyErr_Occurred()) PyErr_Clear();
+      return 0;
+    }
+#endif
+    if (obj && !PySwigObject_Check(obj)) {
+      /* a PyObject is called 'this', try to get the 'real this'
+	 PySwigObject from it */ 
+      return SWIG_Python_GetSwigThis(obj);
+    }
+    return (PySwigObject *)obj;
+  }
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own) {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  if (!obj) return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr) *ptr = 0;
+    return SWIG_OK;
+  } else {
+    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    while (sobj) {
+      void *vptr = sobj->ptr;
+      if (ty) {
+	swig_type_info *to = sobj->ty;
+	if (to == ty) {
+	  /* no type cast needed */
+	  if (ptr) *ptr = vptr;
+	  break;
+	} else {
+	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+	  if (!tc) {
+	    sobj = (PySwigObject *)sobj->next;
+	  } else {
+	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+	    break;
+	  }
+	}
+      } else {
+	if (ptr) *ptr = vptr;
+	break;
+      }
+    }
+    if (sobj) {
+      if (own) *own = sobj->own;
+      if (flags & SWIG_POINTER_DISOWN) {
+	sobj->own = 0;
+      }
+      return SWIG_OK;
+    } else {
+      int res = SWIG_ERROR;
+      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+	PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+	if (data && !data->implicitconv) {
+	  PyObject *klass = data->klass;
+	  if (klass) {
+	    PyObject *impconv;
+	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+	    impconv = SWIG_Python_CallFunctor(klass, obj);
+	    data->implicitconv = 0;
+	    if (PyErr_Occurred()) {
+	      PyErr_Clear();
+	      impconv = 0;
+	    }
+	    if (impconv) {
+	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      if (iobj) {
+		void *vptr;
+		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+		if (SWIG_IsOK(res)) {
+		  if (ptr) {
+		    *ptr = vptr;
+		    /* transfer the ownership to 'ptr' */
+		    iobj->own = 0;
+		    res = SWIG_AddCast(res);
+		    res = SWIG_AddNewMask(res);
+		  } else {
+		    res = SWIG_AddCast(res);		    
+		  }
+		}
+	      }
+	      Py_DECREF(impconv);
+	    }
+	  }
+	}
+      }
+      return res;
+    }
+  }
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc) {
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+      if (!desc) return SWIG_ERROR;
+    }
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (!tc) return SWIG_ERROR;
+      *ptr = SWIG_TypeCast(tc,vptr);
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, whitout calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      PySwigObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
+  if (!ptr) {
+    return SWIG_Py_Void();
+  } else {
+    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+    PyObject *robj = PySwigObject_New(ptr, type, own);
+    PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
+    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+      if (inst) {
+	Py_DECREF(robj);
+	robj = inst;
+      }
+    }
+    return robj;
+  }
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+SWIG_Python_DestroyModule(void *vptr)
+{
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
+      if (data) PySwigClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
+
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				   swig_empty_runtime_method_table);
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = PyString_FromString(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+      }
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+PySwigObject_GetDesc(PyObject *self)
+{
+  PySwigObject *v = (PySwigObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && PySwigObject_Check(obj)) {
+      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? PyString_AsString(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+    if (flags & SWIG_POINTER_EXCEPTION) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+  }
+  return result;
+}
+
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_a_4__double swig_types[0]
+#define SWIGTYPE_p_char swig_types[1]
+#define SWIGTYPE_p_double swig_types[2]
+#define SWIGTYPE_p_f_int__void swig_types[3]
+#define SWIGTYPE_p_f_int_int__void swig_types[4]
+#define SWIGTYPE_p_f_int_int_int__void swig_types[5]
+#define SWIGTYPE_p_f_int_int_int_int__void swig_types[6]
+#define SWIGTYPE_p_f_int_p_void__void swig_types[7]
+#define SWIGTYPE_p_f_unsigned_char_int_int__void swig_types[8]
+#define SWIGTYPE_p_f_unsigned_int_int_int_int__void swig_types[9]
+#define SWIGTYPE_p_f_unsigned_long__void swig_types[10]
+#define SWIGTYPE_p_f_void__void swig_types[11]
+#define SWIGTYPE_p_float swig_types[12]
+#define SWIGTYPE_p_int swig_types[13]
+#define SWIGTYPE_p_long swig_types[14]
+#define SWIGTYPE_p_p_float swig_types[15]
+#define SWIGTYPE_p_short swig_types[16]
+#define SWIGTYPE_p_signed_char swig_types[17]
+#define SWIGTYPE_p_unsigned_char swig_types[18]
+#define SWIGTYPE_p_unsigned_long swig_types[19]
+#define SWIGTYPE_p_unsigned_short swig_types[20]
+#define SWIGTYPE_p_void swig_types[21]
+static swig_type_info *swig_types[23];
+static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _utillib.so
+  ------------------------------------------------*/
+#define SWIG_init    init_utillib
+
+#define SWIG_name    "_utillib"
+
+#define SWIGVERSION 0x010333 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _MSC_VER
+# include <windows.h>
+#endif
+
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
+#include <GL/gl.h>
+#endif
+
+#include <pythonplus.h>
+#include "opengltk.h"
+
+static PyObject_t util_processerror( GLenum errcode)
+{
+  static PyObject_t glraise = NULL;
+
+  if (NOT glraise)
+    {
+      PyObject_t excmodule;
+      excmodule = PyImport_ImportModule( "opengltk.exception");
+      if (NOT excmodule) return NULL;
+      glraise = PyObject_GetAttrString( excmodule, "processglerror");
+      Py_DECREF( excmodule);
+      if (NOT glraise) return NULL;
+    }
+
+  return PyObject_CallFunction( glraise, "i", errcode);
+}
+
+static struct opengltk_export utilexport = {
+  util_processerror,
+  NULL, /*pythread*/
+  1, /*threadunlocked*/
+  1 /*checkerror*/
+};
+
+static PyObject_t attachCurrentThread( PyObject_t self, PyObject_t args)
+{
+  if (NOT PyArg_ParseTuple( args, "")) return NULL;
+
+  if (utilexport.pythread)
+    {
+      if (PyThreadState_Get() == utilexport.pythread)
+	return PyErr_Format( PyExc_RuntimeError,
+			     "current thread already attached");
+      else PyErr_Format( PyExc_RuntimeError,
+			 "already attached to a different thread");
+    }
+  utilexport.pythread = PyThreadState_Get();
+
+  return Py_INCREF( Py_None), Py_None;
+}
+
+static PyObject_t detachCurrentThread( PyObject_t self, PyObject_t args)
+{
+  if (NOT PyArg_ParseTuple( args, "")) return NULL;
+
+  if (NOT utilexport.pythread)
+    return PyErr_Format( PyExc_RuntimeError, "thread not attached");
+
+  if (PyThreadState_Get() != utilexport.pythread)
+    return PyErr_Format( PyExc_RuntimeError,
+			 "thread attached to a different thread");
+  utilexport.pythread = NULL;
+
+  return Py_INCREF( Py_None), Py_None;
+}
+
+static PyObject_t attachedThread( PyObject_t self, PyObject_t args)
+{
+  if (NOT PyArg_ParseTuple( args, "")) return NULL;
+
+  return PyErr_Format( PyExc_NotImplementedError, __FILE__ ":%i", __LINE__);
+  /* return utilexport.pythread ?
+     /x how does one creat the Thread object
+       from a PyThreadState pointer.... ??? x/
+       : Py_INCREF( Py_None), Py_None; */
+}
+
+
+#include "callback.h"
+
+static PyObject_t converter_voidstar2buffer( void* ptr)
+{
+return PyBuffer_FromMemory( ptr, 0x100000);
+}
+
+
+/* void void_void_callback( int idx); */
+
+static void void_void_callback( int idx)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "si", "void_void", idx);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_void");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_void_0( void)
+{
+  void_void_callback( 0);
+}
+
+static void WSTDCALL void_void_1( void)
+{
+  void_void_callback( 1);
+}
+
+static void WSTDCALL void_void_2( void)
+{
+  void_void_callback( 2);
+}
+
+static void WSTDCALL void_void_3( void)
+{
+  void_void_callback( 3);
+}
+
+static void WSTDCALL void_void_4( void)
+{
+  void_void_callback( 4);
+}
+
+static void WSTDCALL void_void_5( void)
+{
+  void_void_callback( 5);
+}
+
+static void WSTDCALL void_void_6( void)
+{
+  void_void_callback( 6);
+}
+
+static void WSTDCALL void_void_7( void)
+{
+  void_void_callback( 7);
+}
+
+static void WSTDCALL void_void_8( void)
+{
+  void_void_callback( 8);
+}
+
+static void WSTDCALL void_void_9( void)
+{
+  void_void_callback( 9);
+}
+
+static void WSTDCALL void_void_10( void)
+{
+  void_void_callback( 10);
+}
+
+static void WSTDCALL void_void_11( void)
+{
+  void_void_callback( 11);
+}
+
+static void WSTDCALL void_void_12( void)
+{
+  void_void_callback( 12);
+}
+
+static void WSTDCALL void_void_13( void)
+{
+  void_void_callback( 13);
+}
+
+static void WSTDCALL void_void_14( void)
+{
+  void_void_callback( 14);
+}
+
+static void_void_f void_void_array[] = {
+  void_void_0,
+  void_void_1,
+  void_void_2,
+  void_void_3,
+  void_void_4,
+  void_void_5,
+  void_void_6,
+  void_void_7,
+  void_void_8,
+  void_void_9,
+  void_void_10,
+  void_void_11,
+  void_void_12,
+  void_void_13,
+  void_void_14,
+};
+
+#define void_void_DIM (sizeof void_void_array / sizeof *void_void_array)
+
+static void_void_f void_void_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_void_DIM);
+  return void_void_array[ idx];
+}
+
+
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+  #define SWIG_From_long   PyInt_FromLong 
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+/* void void_GLenum_callback( int idx, GLenum which); */
+static void void_GLenum_callback( int idx, GLenum which)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "sii", "void_GLenum", idx, which);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_GLenum");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_GLenum_0(  GLenum which)
+{
+  void_GLenum_callback( 0, which);
+}
+
+static void WSTDCALL void_GLenum_1(  GLenum which)
+{
+  void_GLenum_callback( 1, which);
+}
+
+static void WSTDCALL void_GLenum_2(  GLenum which)
+{
+  void_GLenum_callback( 2, which);
+}
+
+static void WSTDCALL void_GLenum_3(  GLenum which)
+{
+  void_GLenum_callback( 3, which);
+}
+
+static void WSTDCALL void_GLenum_4(  GLenum which)
+{
+  void_GLenum_callback( 4, which);
+}
+
+static void WSTDCALL void_GLenum_5(  GLenum which)
+{
+  void_GLenum_callback( 5, which);
+}
+
+static void WSTDCALL void_GLenum_6(  GLenum which)
+{
+  void_GLenum_callback( 6, which);
+}
+
+static void WSTDCALL void_GLenum_7(  GLenum which)
+{
+  void_GLenum_callback( 7, which);
+}
+
+static void WSTDCALL void_GLenum_8(  GLenum which)
+{
+  void_GLenum_callback( 8, which);
+}
+
+static void WSTDCALL void_GLenum_9(  GLenum which)
+{
+  void_GLenum_callback( 9, which);
+}
+
+static void WSTDCALL void_GLenum_10(  GLenum which)
+{
+  void_GLenum_callback( 10, which);
+}
+
+static void WSTDCALL void_GLenum_11(  GLenum which)
+{
+  void_GLenum_callback( 11, which);
+}
+
+static void WSTDCALL void_GLenum_12(  GLenum which)
+{
+  void_GLenum_callback( 12, which);
+}
+
+static void WSTDCALL void_GLenum_13(  GLenum which)
+{
+  void_GLenum_callback( 13, which);
+}
+
+static void WSTDCALL void_GLenum_14(  GLenum which)
+{
+  void_GLenum_callback( 14, which);
+}
+
+static void_GLenum_f void_GLenum_array[] = {
+  void_GLenum_0,
+  void_GLenum_1,
+  void_GLenum_2,
+  void_GLenum_3,
+  void_GLenum_4,
+  void_GLenum_5,
+  void_GLenum_6,
+  void_GLenum_7,
+  void_GLenum_8,
+  void_GLenum_9,
+  void_GLenum_10,
+  void_GLenum_11,
+  void_GLenum_12,
+  void_GLenum_13,
+  void_GLenum_14,
+};
+
+#define void_GLenum_DIM (sizeof void_GLenum_array / sizeof *void_GLenum_array)
+
+static void_GLenum_f void_GLenum_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_GLenum_DIM);
+  return void_GLenum_array[ idx];
+}
+
+
+
+
+/* void void_int_callback( int idx, int arg0); */
+
+static void void_int_callback( int idx, int arg0)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "sii", "void_int", idx, arg0);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_int_0(  int arg0)
+{
+  void_int_callback( 0, arg0);
+}
+
+static void WSTDCALL void_int_1(  int arg0)
+{
+  void_int_callback( 1, arg0);
+}
+
+static void WSTDCALL void_int_2(  int arg0)
+{
+  void_int_callback( 2, arg0);
+}
+
+static void WSTDCALL void_int_3(  int arg0)
+{
+  void_int_callback( 3, arg0);
+}
+
+static void WSTDCALL void_int_4(  int arg0)
+{
+  void_int_callback( 4, arg0);
+}
+
+static void WSTDCALL void_int_5(  int arg0)
+{
+  void_int_callback( 5, arg0);
+}
+
+static void WSTDCALL void_int_6(  int arg0)
+{
+  void_int_callback( 6, arg0);
+}
+
+static void WSTDCALL void_int_7(  int arg0)
+{
+  void_int_callback( 7, arg0);
+}
+
+static void WSTDCALL void_int_8(  int arg0)
+{
+  void_int_callback( 8, arg0);
+}
+
+static void WSTDCALL void_int_9(  int arg0)
+{
+  void_int_callback( 9, arg0);
+}
+
+static void WSTDCALL void_int_10(  int arg0)
+{
+  void_int_callback( 10, arg0);
+}
+
+static void WSTDCALL void_int_11(  int arg0)
+{
+  void_int_callback( 11, arg0);
+}
+
+static void WSTDCALL void_int_12(  int arg0)
+{
+  void_int_callback( 12, arg0);
+}
+
+static void WSTDCALL void_int_13(  int arg0)
+{
+  void_int_callback( 13, arg0);
+}
+
+static void WSTDCALL void_int_14(  int arg0)
+{
+  void_int_callback( 14, arg0);
+}
+
+static void_int_f void_int_array[] = {
+  void_int_0,
+  void_int_1,
+  void_int_2,
+  void_int_3,
+  void_int_4,
+  void_int_5,
+  void_int_6,
+  void_int_7,
+  void_int_8,
+  void_int_9,
+  void_int_10,
+  void_int_11,
+  void_int_12,
+  void_int_13,
+  void_int_14,
+};
+
+#define void_int_DIM (sizeof void_int_array / sizeof *void_int_array)
+
+static void_int_f void_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_int_DIM);
+  return void_int_array[ idx];
+}
+
+
+
+
+/* void void_int_int_callback( int idx, int arg0, int arg1); */
+
+static void void_int_int_callback( int idx, int arg0, int arg1)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siii", "void_int_int", idx, arg0, arg1);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_int_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_int_int_0(  int arg0, int arg1)
+{
+  void_int_int_callback( 0, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_1(  int arg0, int arg1)
+{
+  void_int_int_callback( 1, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_2(  int arg0, int arg1)
+{
+  void_int_int_callback( 2, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_3(  int arg0, int arg1)
+{
+  void_int_int_callback( 3, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_4(  int arg0, int arg1)
+{
+  void_int_int_callback( 4, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_5(  int arg0, int arg1)
+{
+  void_int_int_callback( 5, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_6(  int arg0, int arg1)
+{
+  void_int_int_callback( 6, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_7(  int arg0, int arg1)
+{
+  void_int_int_callback( 7, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_8(  int arg0, int arg1)
+{
+  void_int_int_callback( 8, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_9(  int arg0, int arg1)
+{
+  void_int_int_callback( 9, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_10(  int arg0, int arg1)
+{
+  void_int_int_callback( 10, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_11(  int arg0, int arg1)
+{
+  void_int_int_callback( 11, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_12(  int arg0, int arg1)
+{
+  void_int_int_callback( 12, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_13(  int arg0, int arg1)
+{
+  void_int_int_callback( 13, arg0, arg1);
+}
+
+static void WSTDCALL void_int_int_14(  int arg0, int arg1)
+{
+  void_int_int_callback( 14, arg0, arg1);
+}
+
+static void_int_int_f void_int_int_array[] = {
+  void_int_int_0,
+  void_int_int_1,
+  void_int_int_2,
+  void_int_int_3,
+  void_int_int_4,
+  void_int_int_5,
+  void_int_int_6,
+  void_int_int_7,
+  void_int_int_8,
+  void_int_int_9,
+  void_int_int_10,
+  void_int_int_11,
+  void_int_int_12,
+  void_int_int_13,
+  void_int_int_14,
+};
+
+#define void_int_int_DIM (sizeof void_int_int_array / sizeof *void_int_int_array)
+
+static void_int_int_f void_int_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_int_int_DIM);
+  return void_int_int_array[ idx];
+}
+
+
+
+
+  /*void void_int_int_int_callback( int idx, int arg0, int arg1, int arg2); */
+
+static void void_int_int_int_callback( int idx, int arg0, int arg1, int arg2)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siiii", "void_int_int_int", idx, arg0, arg1, arg2);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_int_int_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_int_int_int_0(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 0, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_1(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 1, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_2(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 2, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_3(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 3, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_4(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 4, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_5(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 5, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_6(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 6, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_7(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 7, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_8(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 8, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_9(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 9, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_10(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 10, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_11(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 11, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_12(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 12, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_13(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 13, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_int_int_int_14(  int arg0, int arg1, int arg2)
+{
+  void_int_int_int_callback( 14, arg0, arg1, arg2);
+}
+
+static void_int_int_int_f void_int_int_int_array[] = {
+  void_int_int_int_0,
+  void_int_int_int_1,
+  void_int_int_int_2,
+  void_int_int_int_3,
+  void_int_int_int_4,
+  void_int_int_int_5,
+  void_int_int_int_6,
+  void_int_int_int_7,
+  void_int_int_int_8,
+  void_int_int_int_9,
+  void_int_int_int_10,
+  void_int_int_int_11,
+  void_int_int_int_12,
+  void_int_int_int_13,
+  void_int_int_int_14,
+};
+
+#define void_int_int_int_DIM (sizeof void_int_int_int_array / sizeof *void_int_int_int_array)
+
+static void_int_int_int_f void_int_int_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_int_int_int_DIM);
+  return void_int_int_int_array[ idx];
+}
+
+
+
+  /* void void_int_int_int_int_callback( int idx, int arg0, int arg1, int arg2, int arg3); */
+static void void_int_int_int_int_callback( int idx, int arg0, int arg1, int arg2, int arg3)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siiiii", "void_int_int_int_int", idx, arg0, arg1, arg2, arg3);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_int_int_int_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_int_int_int_int_0(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 0, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_1(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 1, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_2(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 2, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_3(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 3, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_4(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 4, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_5(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 5, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_6(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 6, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_7(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 7, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_8(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 8, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_9(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 9, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_10(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 10, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_11(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 11, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_12(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 12, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_13(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 13, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_int_int_int_int_14(  int arg0, int arg1, int arg2, int arg3)
+{
+  void_int_int_int_int_callback( 14, arg0, arg1, arg2, arg3);
+}
+
+static void_int_int_int_int_f void_int_int_int_int_array[] = {
+  void_int_int_int_int_0,
+  void_int_int_int_int_1,
+  void_int_int_int_int_2,
+  void_int_int_int_int_3,
+  void_int_int_int_int_4,
+  void_int_int_int_int_5,
+  void_int_int_int_int_6,
+  void_int_int_int_int_7,
+  void_int_int_int_int_8,
+  void_int_int_int_int_9,
+  void_int_int_int_int_10,
+  void_int_int_int_int_11,
+  void_int_int_int_int_12,
+  void_int_int_int_int_13,
+  void_int_int_int_int_14,
+};
+
+#define void_int_int_int_int_DIM (sizeof void_int_int_int_int_array / sizeof *void_int_int_int_int_array)
+
+static void_int_int_int_int_f void_int_int_int_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_int_int_int_int_DIM);
+  return void_int_int_int_int_array[ idx];
+}
+
+
+
+
+  /* void void_unsignedchar_int_int_callback( int idx, unsigned char arg0, int arg1, int arg2); */
+
+static void void_unsignedchar_int_int_callback( int idx, unsigned char arg0, int arg1, int arg2)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siiii", "void_unsignedchar_int_int", idx, arg0, arg1, arg2);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_unsignedchar_int_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_unsignedchar_int_int_0(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 0, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_1(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 1, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_2(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 2, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_3(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 3, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_4(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 4, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_5(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 5, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_6(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 6, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_7(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 7, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_8(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 8, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_9(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 9, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_10(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 10, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_11(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 11, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_12(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 12, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_13(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 13, arg0, arg1, arg2);
+}
+
+static void WSTDCALL void_unsignedchar_int_int_14(  unsigned char arg0, int arg1, int arg2)
+{
+  void_unsignedchar_int_int_callback( 14, arg0, arg1, arg2);
+}
+
+static void_unsignedchar_int_int_f void_unsignedchar_int_int_array[] = {
+  void_unsignedchar_int_int_0,
+  void_unsignedchar_int_int_1,
+  void_unsignedchar_int_int_2,
+  void_unsignedchar_int_int_3,
+  void_unsignedchar_int_int_4,
+  void_unsignedchar_int_int_5,
+  void_unsignedchar_int_int_6,
+  void_unsignedchar_int_int_7,
+  void_unsignedchar_int_int_8,
+  void_unsignedchar_int_int_9,
+  void_unsignedchar_int_int_10,
+  void_unsignedchar_int_int_11,
+  void_unsignedchar_int_int_12,
+  void_unsignedchar_int_int_13,
+  void_unsignedchar_int_int_14,
+};
+
+#define void_unsignedchar_int_int_DIM (sizeof void_unsignedchar_int_int_array / sizeof *void_unsignedchar_int_int_array)
+
+static void_unsignedchar_int_int_f void_unsignedchar_int_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_unsignedchar_int_int_DIM);
+  return void_unsignedchar_int_int_array[ idx];
+}
+
+
+
+
+  /* void void_unsignedint_int_int_int_callback( int idx, unsigned int arg0, int arg1, int arg2, int arg3); */
+
+static void void_unsignedint_int_int_int_callback( int idx, unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siiiii", "void_unsignedint_int_int_int", idx, arg0, arg1, arg2, arg3);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_unsignedint_int_int_int");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_0(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 0, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_1(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 1, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_2(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 2, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_3(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 3, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_4(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 4, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_5(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 5, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_6(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 6, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_7(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 7, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_8(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 8, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_9(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 9, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_10(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 10, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_11(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 11, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_12(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 12, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_13(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 13, arg0, arg1, arg2, arg3);
+}
+
+static void WSTDCALL void_unsignedint_int_int_int_14(  unsigned int arg0, int arg1, int arg2, int arg3)
+{
+  void_unsignedint_int_int_int_callback( 14, arg0, arg1, arg2, arg3);
+}
+
+static void_unsignedint_int_int_int_f void_unsignedint_int_int_int_array[] = {
+  void_unsignedint_int_int_int_0,
+  void_unsignedint_int_int_int_1,
+  void_unsignedint_int_int_int_2,
+  void_unsignedint_int_int_int_3,
+  void_unsignedint_int_int_int_4,
+  void_unsignedint_int_int_int_5,
+  void_unsignedint_int_int_int_6,
+  void_unsignedint_int_int_int_7,
+  void_unsignedint_int_int_int_8,
+  void_unsignedint_int_int_int_9,
+  void_unsignedint_int_int_int_10,
+  void_unsignedint_int_int_int_11,
+  void_unsignedint_int_int_int_12,
+  void_unsignedint_int_int_int_13,
+  void_unsignedint_int_int_int_14,
+};
+
+#define void_unsignedint_int_int_int_DIM (sizeof void_unsignedint_int_int_int_array / sizeof *void_unsignedint_int_int_int_array)
+
+static void_unsignedint_int_int_int_f void_unsignedint_int_int_int_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_unsignedint_int_int_int_DIM);
+  return void_unsignedint_int_int_int_array[ idx];
+}
+
+
+
+
+  /* void void_int_voidstar_callback( int idx, int view, void* context); */
+
+static void void_int_voidstar_callback( int idx, int view, void* context)
+{
+  static PyObject_t s_runcallback = NULL;
+  PyObject_t result;
+
+  if (utilexport.pythread) PyEval_AcquireThread( utilexport.pythread);
+  if (NOT s_runcallback)
+    s_runcallback = PypImport_ModuleAttr( "opengltk.ccallback", "swigcallback");
+  if (NOT s_runcallback) goto FUNEXIT;
+  result = PyObject_CallFunction( s_runcallback, "siiO&", "void_int_voidstar", idx, view, converter_voidstar2buffer, context);
+  if (NOT result) goto FUNEXIT;
+  Py_DECREF( result);
+FUNEXIT:
+  if (PyErr_Occurred()) PypCallback_ProcessErr( "void_int_voidstar");
+  if (utilexport.pythread) PyEval_ReleaseThread( utilexport.pythread);
+  return;
+}
+
+
+static void WSTDCALL void_int_voidstar_0(  int view, void* context)
+{
+  void_int_voidstar_callback( 0, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_1(  int view, void* context)
+{
+  void_int_voidstar_callback( 1, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_2(  int view, void* context)
+{
+  void_int_voidstar_callback( 2, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_3(  int view, void* context)
+{
+  void_int_voidstar_callback( 3, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_4(  int view, void* context)
+{
+  void_int_voidstar_callback( 4, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_5(  int view, void* context)
+{
+  void_int_voidstar_callback( 5, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_6(  int view, void* context)
+{
+  void_int_voidstar_callback( 6, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_7(  int view, void* context)
+{
+  void_int_voidstar_callback( 7, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_8(  int view, void* context)
+{
+  void_int_voidstar_callback( 8, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_9(  int view, void* context)
+{
+  void_int_voidstar_callback( 9, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_10(  int view, void* context)
+{
+  void_int_voidstar_callback( 10, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_11(  int view, void* context)
+{
+  void_int_voidstar_callback( 11, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_12(  int view, void* context)
+{
+  void_int_voidstar_callback( 12, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_13(  int view, void* context)
+{
+  void_int_voidstar_callback( 13, view, context);
+}
+
+static void WSTDCALL void_int_voidstar_14(  int view, void* context)
+{
+  void_int_voidstar_callback( 14, view, context);
+}
+
+static void_int_voidstar_f void_int_voidstar_array[] = {
+  void_int_voidstar_0,
+  void_int_voidstar_1,
+  void_int_voidstar_2,
+  void_int_voidstar_3,
+  void_int_voidstar_4,
+  void_int_voidstar_5,
+  void_int_voidstar_6,
+  void_int_voidstar_7,
+  void_int_voidstar_8,
+  void_int_voidstar_9,
+  void_int_voidstar_10,
+  void_int_voidstar_11,
+  void_int_voidstar_12,
+  void_int_voidstar_13,
+  void_int_voidstar_14,
+};
+
+#define void_int_voidstar_DIM (sizeof void_int_voidstar_array / sizeof *void_int_voidstar_array)
+
+static void_int_voidstar_f void_int_voidstar_array_get( int idx)
+{
+  assert( 0 <= idx);
+  assert( idx < void_int_voidstar_DIM);
+  return void_int_voidstar_array[ idx];
+}
+
+
+
+
+
+  /** #define METH_VARARGS METH_KEYWORDS **/
+
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+//#include <GLUT/glut.h>
+#else
+#include <GL/gl.h>
+#include <GL/glu.h>
+#endif
+
+#include <math.h>
+#include <stdio.h>
+#include <assert.h>
+#include "numpy/arrayobject.h"
+
+
+#define TRY(E) if(! (E)) return NULL
+
+/* MS March 4 '99 */
+
+/********************************************************************
+  Tries to create a contiguous numeric array of type typecode from a 
+  Python object. Works for list, tuples and numeric arrays.
+
+  obj: Numeric array Python object
+  typecode: data type PyArray_{ CHAR, UBYTE, SBYTE, SHORT, INT, LONG, FLOAT,
+                                DOUBLE, CFLOAT, CDOUBLE }
+  expectnd: required number of dimensions. Used for checking. Ignored if <=0.
+  expectdims: array of expected extends. Used for checking. Ignored if <=0.
+
+  Raises ValueError exceptions if:
+  - the PyArray_ContiguousFromObject fails
+  - the array has a bad shape
+  - the extent of a given dimension doesn't match the specified extent.
+********************************************************************/
+
+static PyArrayObject *contiguous_typed_array(PyObject *obj, int typecode,
+                                      int expectnd, int *expectdims)
+{
+  PyArrayObject *arr;
+  int i;
+  char buf[255];
+
+  /* if the shape and type are OK, this function increments the reference
+     count and arr points to obj */
+  if((arr = (PyArrayObject *)PyArray_ContiguousFromObject(obj,
+                                                          typecode, 0,
+                                                          10)) == NULL)
+    {
+      sprintf(buf,"Failed to make a contiguous array of type %d\n", typecode);
+      PyErr_SetString(PyExc_ValueError, buf);
+      return NULL;
+    }
+
+  if(expectnd>0)
+    {
+      if(arr->nd > expectnd + 1 || arr->nd < expectnd)
+        {
+          Py_DECREF((PyObject *)arr);
+          PyErr_SetString(PyExc_ValueError,
+                          "Array has wrong number of dimensions");
+          return NULL;
+        }
+      if(arr->nd == expectnd + 1)
+        {
+          if(arr->dimensions[arr->nd - 1] != 1)
+            {
+              Py_DECREF((PyObject *)arr);
+              PyErr_SetString(PyExc_ValueError,
+                              "Array has wrong number of dimensions");
+              return NULL;
+            }
+        }
+      if(expectdims)
+        {
+          for(i = 0; i < expectnd; i++)
+            if(expectdims[i]>0)
+              if(expectdims[i] != arr->dimensions[i])
+                {
+                  Py_DECREF((PyObject *)arr);
+                  sprintf(buf,"The extent of dimension %d is %d while %d was expected\n",
+                          i, arr->dimensions[i], expectdims[i]);
+                  PyErr_SetString(PyExc_ValueError, buf);
+                  return NULL;
+                }
+                  
+        }
+    }
+
+  return arr;
+}
+
+static PyObject* l_output_helper2(PyObject* target, PyObject* o) {
+    PyObject*   o2;
+    if (!target) {                   
+        target = o;
+    } else if (target == Py_None) {  
+        Py_DECREF(Py_None);
+        target = o;
+    } else {                         
+        if (!PyList_Check(target)) {
+            o2 = target;
+            target = PyList_New(0);
+            PyList_Append(target, o2);
+            Py_XDECREF(o2);
+        }
+        PyList_Append(target,o);
+        Py_XDECREF(o);
+    }
+    return target;
+}
+
+/*
+	When composing successively rotations the resulting matrix often
+	becomes nonorthogonal leading to skewing and scaling effects.
+	This function takes a 4x4 matrix of DOUBLE that represents a OpenGL
+	transformation and reorthogonalizes it
+	uses: contiguous_typed_array
+	available from the interpreter as:
+		CleanRotMat( mat )
+*/
+void glCleanRotMat(double mat_data[16], double a[4][4])
+{
+  float s;
+  int i;
+  memcpy(a, (void *)mat_data, sizeof(double) * 16);
+
+  for (i=0;i<3;i++) a[i][3]=a[3][i]=0.0;
+  a[3][3]=1.0;
+
+  for (i=0,s=0.0;i<3;i++) s+=a[0][i]*a[0][i];
+  s=sqrt(s);
+  for (i=0;i<3;i++) a[0][i]/=s;	/* first row normalized */
+
+  a[2][0]=a[0][1]*a[1][2]-a[0][2]*a[1][1];
+  a[2][1]=a[0][2]*a[1][0]-a[0][0]*a[1][2];
+  a[2][2]=a[0][0]*a[1][1]-a[0][1]*a[1][0];
+  for (i=0,s=0.0;i<3;i++) s+=a[2][i]*a[2][i];
+  s=sqrt(s);
+  for (i=0;i<3;i++) a[2][i]/=s;	/* third row orthonormal to first */
+
+  a[1][0]=a[2][1]*a[0][2]-a[2][2]*a[0][1];
+  a[1][1]=a[2][2]*a[0][0]-a[2][0]*a[0][2];
+  a[1][2]=a[2][0]*a[0][1]-a[2][1]*a[0][0];
+  for (i=0,s=0.0;i<3;i++) s+=a[1][i]*a[1][i];
+  s=sqrt(s);
+  for (i=0;i<3;i++) a[1][i]/=s;	/* second row orthonormal to 1,3 */
+}
+
+
+/* just a rewriting of GLUTSOLIDSPHERE by guillaume vareille */
+#ifndef __APPLE__
+static GLUquadricObj * quadObj = NULL ;
+#endif // __APPLE__
+void extractedGlutSolidSphere ( GLdouble radius , GLint slices , GLint stacks, int insideout )
+{
+  /* code extracted from glut_shape.c */
+  /* printf ( "guillaume's extractedGlutSolidSphere" ) ; */
+
+#ifdef __APPLE__
+  static GLUquadricObj * quadObj = NULL ;
+#endif // __APPLE__
+
+  if ( ! quadObj ) 
+  {
+    quadObj = gluNewQuadric ( ) ;
+    if ( ! quadObj )
+    {
+      printf ( "Can't allocate memory for extractedGlutSolidSphere" ) ;
+      return ;
+    }
+  }
+
+  if ( insideout == 0 )
+  {
+    gluQuadricOrientation ( quadObj , GLU_OUTSIDE ) ;
+  }
+  else
+  {
+    gluQuadricOrientation ( quadObj , GLU_INSIDE ) ;
+  }
+
+  gluQuadricDrawStyle ( quadObj , GLU_FILL ) ;
+  
+  gluQuadricNormals ( quadObj , GLU_SMOOTH ) ;
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluSphere ( quadObj , radius , slices , stacks ) ;
+
+#ifdef __APPLE__
+  gluDeleteQuadric ( quadObj ) ;
+  quadObj = NULL ;
+#endif // __APPLE__
+
+}
+/* end of modified GLUTSOLIDSPHERE by guillaume vareille */
+
+
+void solidCylinder ( GLdouble radiusBase ,
+					 GLdouble radiusTop ,
+                     GLdouble height ,
+                     GLint slices ,
+                     GLint stacks ,
+                     int insideout )
+{
+  /* printf ( "guillaume's solidCylinder" ) ; */
+  /* by guillaume vareille (inspired by GLUTSOLIDSPHERE) */
+
+#ifdef __APPLE__
+  static GLUquadricObj * quadObj = NULL ;
+#endif // __APPLE__
+
+  if ( ! quadObj ) 
+  {
+    quadObj = gluNewQuadric ( ) ;
+    if ( ! quadObj )
+    {
+      printf ( "Can't allocate memory for extractedGlutSolidSphere" ) ;
+      return ;
+    }
+  }
+
+  if ( insideout == 0 )
+  {
+    gluQuadricOrientation ( quadObj , GLU_OUTSIDE ) ;
+  }
+  else
+  {
+    gluQuadricOrientation ( quadObj , GLU_INSIDE ) ;
+  }
+
+  gluQuadricDrawStyle ( quadObj , GLU_FILL ) ;
+
+  gluQuadricNormals ( quadObj , GLU_SMOOTH ) ;
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluCylinder ( quadObj , radiusBase , radiusTop , height, slices , stacks ) ;
+
+#ifdef __APPLE__
+  gluDeleteQuadric ( quadObj ) ;
+  quadObj = NULL ;
+#endif // __APPLE__
+
+}
+
+
+/*************
+  Compute vector v, normal to the triangle (p1,p2,p3) assuming that the order
+  of the points p1,p2,p3 provides the face's orientation
+**************/
+static void triangle_normal(double *p1,double *p2, double *p3, float *v)
+{
+    double v1[3],v2[3],norm;
+    short i;
+
+    for (i=0; i<3; i++) {
+      v1[i] = p2[i]-p1[i];   /* vector (p1,p2) */
+      v2[i] = p3[i]-p2[i];   /* vector (p2,p3) */
+    }
+    v[0] = v1[1]*v2[2] - v1[2]*v2[1];  /* v3 = v1^v2 */
+    v[1] = v1[2]*v2[0] - v1[0]*v2[2];
+    v[2] = v1[0]*v2[1] - v1[1]*v2[0];
+
+    norm = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+    if (norm != 0.) {
+      for (i=0;i<3;i++) v[i] /= norm;
+    } else {
+      for (i=0;i<3;i++) v[i] = 0.0;
+    }
+}
+
+#include <string.h>
+
+
+/*
+
+ Computes the vector normal to each triangle using
+ triangle_normal. The resulting normals are returned
+ in a m*3 array of floats.
+*/
+
+int triangleNormalsPerFace(double *v_data, int lenv[2],  
+			    int *t_data, int lent[2],
+			    float *trinorm)
+{
+  int   i;
+  for (i=0; i<3*lent[0]; i+=3) 
+    {
+      int v1,v2,v3;
+      v1 = t_data[i];
+      if ( v1 >= lenv[0] ) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v1, i/3, lenv[0]);
+	  return 0;
+	}
+      v2 = t_data[i+1];
+      if ( v2 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v2, i/3, lenv[0]);
+	  return 0;
+	}
+      v3 = t_data[i+2];
+      if ( v3 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v3, i/3, lenv[0]);
+	  return 0;
+	}
+      
+      triangle_normal( &v_data[v1*3], &v_data[v2*3], &v_data[v3*3], 
+		       &trinorm[i] );
+    }
+  return 1;
+}
+
+/**
+Computes the vector normal to each triangle (face) using
+triangle_normal. The normals for each vertex are obtained by 
+summing up the faces normals of each triangle this vertex belongs to. The 
+resulting normals are returned in a n*3 array of floats.
+**/
+int triangleNormalsPerVertex(double *v_data, int lenv[2], float *vnorm,
+			      int *t_data, int lent[2])
+{
+  int   i, j, k, *tric;
+  float *trinorm;
+  /*trinorm = (float *)malloc(lent[0] * 3 * sizeof(float)); */
+  trinorm = (float *)malloc(lent[0] * lent[1] * sizeof(float));
+  if (!trinorm)
+    {
+      fprintf(stderr, "Failed to allocate memory for the triangle normals \n");
+      return 0;
+    }
+  for (i=0; i<3*lent[0]; i+=3) 
+    {
+      int v1,v2,v3;
+      v1 = t_data[i];
+      if ( v1 >= lenv[0] ) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v1, i/3, lenv[0]);
+	  return 0;
+	}
+      v2 = t_data[i+1];
+      if ( v2 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v2, i/3, lenv[0]);
+	  return 0;
+	}
+      v3 = t_data[i+2];
+      if ( v3 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v3, i/3, lenv[0]);
+	  return 0;
+	}
+      
+      triangle_normal( &v_data[v1*3], &v_data[v2*3], &v_data[v3*3], 
+		       &trinorm[i] );
+    }
+    /* compute the vertices normals */
+      tric = (int *)malloc(lenv[0] * sizeof(int));
+      /*printf("vrnorm at %p, tric at %p\n", vnorm, tric);*/
+      if (!tric)
+	{
+	  fprintf(stderr, "Failed to allocate memory for the normals('tric') \n");
+	  free(trinorm);
+	  return 0;
+	}
+      for (i=0; i<lenv[0]; i++)
+	{
+	  tric[i] = 0;
+	  for (j=0; j<3; j++) vnorm[i*3 + j] = 0.0;
+	}
+      for (i=0; i<lent[0]*3; i+=3)    /*loop over triangles*/
+	{
+	  for (k=0; k<3; k++)          /*loop over vertices*/
+	    {
+	      tric[t_data[i+k]]++;
+	      vnorm[3*t_data[i+k]] += trinorm[i];
+	      vnorm[3*t_data[i+k]+1] += trinorm[i+1];
+	      vnorm[3*t_data[i+k]+2] += trinorm[i+2];
+	    }
+	}
+      for (i=0; i<lenv[0]; i++)
+	{
+	  for (k=0; k<3; k++) vnorm[i*3 + k] /= tric[i];
+	}
+      /*printf("free tric at %p\n", tric);*/
+      free(tric);
+      free(trinorm);
+      return 1;
+}
+
+/**
+The face and vertex normals are computed.
+**/
+int triangleNormalsBoth(double *v_data, int lenv[2], float *vnorm,
+			 int *t_data, int lent[2], float *trinorm)
+{
+  int   i, j, k, *tric;
+  for (i=0; i<3*lent[0]; i+=3) 
+    {
+      int v1,v2,v3;
+      v1 = t_data[i];
+      if ( v1 >= lenv[0] ) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v1, i/3, lenv[0]);
+	  return 0;
+	}
+      v2 = t_data[i+1];
+      if ( v2 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v2, i/3, lenv[0]);
+	  return 0;
+	}
+      v3 = t_data[i+2];
+      if ( v3 >= lenv[0]) 
+	{
+	  fprintf(stderr, "Error: Coordinates index %d in face %d out of range %d\n", v3, i/3, lenv[0]);
+	  return 0;
+	}
+      
+      triangle_normal( &v_data[v1*3], &v_data[v2*3], &v_data[v3*3], 
+		       &trinorm[i] );
+    }
+  /* compute the vertices normals */
+  tric = (int *)malloc(lenv[0] * sizeof(int));
+  /*printf("vrnorm at %p, tric at %p\n", vnorm, tric);*/
+  /** if (!vnorm || !tric) **/
+  if (!tric)
+    {
+      fprintf(stderr, "Failed to allocate memory for the normals \n");
+      return 0;
+    }
+  for (i=0; i<lenv[0]; i++)
+    {
+      tric[i] = 0;
+      for (j=0; j<3; j++) vnorm[i*3 + j] = 0.0;
+    }
+  for (i=0; i<lent[0]*3; i+=3)    /*loop over triangles*/
+    {
+      for (k=0; k<3; k++)          /*loop over vertices*/
+	{
+	  tric[t_data[i+k]]++;
+	  vnorm[3*t_data[i+k]] += trinorm[i];
+	  vnorm[3*t_data[i+k]+1] += trinorm[i+1];
+	  vnorm[3*t_data[i+k]+2] += trinorm[i+2];
+	}
+    }
+  for (i=0; i<lenv[0]; i++)
+    {
+      for (k=0; k<3; k++) vnorm[i*3 + k] /= tric[i];
+    }
+  /*printf("free tric at %p\n", tric);*/
+  free(tric);
+  return 1;
+}
+
+/*
+   WARNING this function is still experimental and has not yet being fully
+	   tested!
+   Build a displaylist for a set of indexed GL geometries (all but GL_POINTS).
+   Indexed geometries are specified using a sequence of vertices (n*3 floats)
+   and a sequence on m*p integers specifying how to connect the vertices.
+   - All parts (faces or lines) can have exactly length p (p vertices) or can
+     be of length < p in which case the list is terminated by -1.
+   - Sets of lines of length 2, sets of triangles and sets of quads are drawn
+     without sending glBegin( ... ) / glEnd () for each primitive. This is more
+     efficient but has the draw back that the picking mechanism can no more
+     distinguish between different parts. For instance, in order to get 
+     pickable triangles one should use GL_POLYGON as the first argument rather
+     than GL_TRIANGLES.
+   - All arguments are named and some are optional.
+   - Lighting is enable only if normals are specified and their number is
+     either 1, number of index lists or number of vertices. The normal binding
+     mode (OVERALL, PER_PART, PER_VERTEX) is infered from the number of 
+     normals available.
+   - When no normals are given, lighting is disabled and the polygon mode
+     is set to lines.
+   - Front and back polygon properties can be specified optionally. They have
+     to be a sequence of 5 sequences of properties: one each of the material
+     property component: GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION,
+		         GL_SHININESS
+     * The first four property lists have to be (possibly empty) 4-sequences of
+     floating point values ranging from 0.0 to 1.0 (RGBA).
+     * The fifth property (GL_SHININESS) is a (possibly empty) sequence of
+     floating points values ranging from 0.0 to 128.0.
+     * property binding modes are selected automatically and separately for
+     each property, based on the number of properties available and the number
+     of vertices and parts (see normals bind mode).
+
+   Required arguments:
+      type       :    GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP, GL_POLYGON,
+                      GL_QUADS, GL_QUAD_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP,
+		      GL_TRIANGLE_FAN
+      coordinates:    sequence of shape n*3 for n vertices (float or double)
+      indices    :    sequence of shape m*3 for m triangles (int)
+
+   Optional arguments:
+      normals:        sequence of p*3 (float or double).
+                      If p==n normals will be bound by vertex
+                      If p==m normals will be bound by face
+                      If p==1 normal set OVERALL
+		      else lighting is turned off, GL_LINE is used ?
+      frontMaterial:  sequence of p*4 float (0.0-1.0)
+      backMaterial:   sequence of p*4 float (0.0-1.0)
+      frontMatBind:   binding mode for front material
+      backMatBind:    binding mode for back material
+      frontAndBack:   int = 0 or 1 to use the front properties for back facing
+                      polygons.
+      texIndices:     texture indices n * 1,2,3 or 4 for n vertices 
+
+03 '99: Remove overall coloring from display list (has to be done outside)
+03 '99: Added color memory to minimize context switches
+
+TODO: materials should be indexed too
+*/
+static short isNewColor(float *c, int assignColorToStatic )
+{
+  static float col[4];
+  if (!c) {
+    col[0] = col[1] = col[2] = col[3] = -1.0;
+    return 0;
+  } else {
+    if (fabs(c[0]-col[0]) < 0.0001 && fabs(c[1]-col[1]) < 0.0001 && 
+	fabs(c[2]-col[2]) < 0.0001 && fabs(c[3]-col[3]) < 0.0001) {
+      return 0;
+    }
+#ifdef DEBUG
+    printf("new color %f %f %f %f\n", c[0],c[1],c[2],c[3]);
+#endif
+		if (assignColorToStatic)
+		{
+	    col[0] = c[0];
+	    col[1] = c[1];
+	    col[2] = c[2];
+	    col[3] = c[3];
+		}
+    return 1;
+  }
+}
+
+static short isNewMaterial( int face, int prop, float *c, int assignColorToStatic )
+{
+  static float col[2][5][4];
+  int f,i,j,k;
+  if (!c) 
+  {
+    for (i=0;i<2;i++)
+      for (j=0;j<5;j++)
+	      for (k=0;k<4;k++)
+	        col[i][j][k] = -1.0;
+    return 0;
+  }
+  else
+  {
+    f = (face==GL_FRONT) ? 0:1;
+    if (fabs(c[0]-col[f][prop][0]) < 0.0001 &&
+	    fabs(c[1]-col[f][prop][1]) < 0.0001 && 
+	    fabs(c[2]-col[f][prop][2]) < 0.0001 &&
+	    fabs(c[3]-col[f][prop][3]) < 0.0001)
+		{
+      return 0;
+  	}
+#ifdef DEBUG
+    printf("new material %d %d %f %f %f %f\n", face, prop, c[0],c[1],c[2],c[3]);
+#endif
+		if (assignColorToStatic)
+		{
+	    col[f][prop][0] = c[0];
+	    col[f][prop][1] = c[1];
+	    col[f][prop][2] = c[2];
+	    col[f][prop][3] = c[3];
+		}
+    return 1;
+  }
+}
+
+static void reapplyMaterial(
+		int faceIndex ,
+		float * frontMaterial [ 5 ] ,
+		float * backMaterial [ 5 ] ,
+		int frontMatBind [ 5 ] , 
+		int backMatBind [ 5 ] ,
+		int frontAndBack 
+		)
+{
+	int k , ii , face ;
+  int PER_VERTEX = 11 ;
+  int propConst [ ] = { GL_AMBIENT , GL_DIFFUSE , GL_EMISSION , GL_SPECULAR , GL_SHININESS } ;
+	int faceIndex4 = faceIndex * 4 ;
+
+	if (frontMaterial)
+	{
+	  if (!frontAndBack)
+			face = GL_FRONT;
+	  else 
+			face = GL_FRONT_AND_BACK;
+		for (k=0; k<5; k++) 
+		{
+			if (frontMatBind[k] == PER_VERTEX)
+			{
+				if (k == 4) ii = faceIndex;
+				else ii = faceIndex4;
+			  glMaterialfv( (GLenum)face, (GLenum)propConst[k], &frontMaterial[k][ii] );
+			}
+		}
+	}
+	
+  if (backMaterial && !frontAndBack)
+	{
+		for (k=0; k<5; k++) 
+		{
+			if (backMatBind[k] == PER_VERTEX)
+			{
+				if (k == 4) ii = faceIndex;
+				else ii = faceIndex4;
+			  glMaterialfv( (GLenum)GL_BACK, (GLenum)propConst[k], &backMaterial[k][ii] );
+			}
+		}
+	}
+}
+
+
+static float colorDistance ( float aColorA [ 3 ] ,  float aColorB [ 3 ] )
+{
+	/* from "http://www.compuphase.com/cmetric.htm" */
+  float r , g , b ;
+  float rmean = ( aColorA [ 0 ] + aColorB [ 0 ] ) / 2 ;
+  r = aColorA [ 0 ] - aColorB [ 0 ] ;
+  g = aColorA [ 1 ] - aColorB [ 1 ] ;
+  b = aColorA [ 2 ] - aColorB [ 2 ] ;
+  return   ( 2 + rmean ) * r * r 
+         + ( 4 * g * g )
+         + ( 3 - rmean )  * b * b ;
+}
+
+
+static float isMultiColorDuplet ( 
+		int indexA , 
+		int indexB ,
+		float * frontMaterial [ 5 ] ,
+		float * backMaterial [ 5 ] ,
+		int frontMatBind [ 5 ] , 
+		int backMatBind [ 5 ] ,
+		int frontAndBack )
+{
+	/*
+	 * 0 : both are of the same color
+	 * 1 : different colors
+	 */
+
+	int PER_VERTEX = 11 ;
+	int i ;
+	float * lA ;
+	float * lB ;
+	
+	for ( i = 0 ; i < 5 ; i ++ )
+	{
+		if ( frontMatBind [ i ] == PER_VERTEX ) 
+		{
+			lA = & frontMaterial [ i ] [ indexA ] ;
+			lB = & frontMaterial [ i ] [ indexB ] ;
+			if ( ( lA[0] != lB[0] ) || ( lA[1] != lB[1] ) || ( lA[2] != lB[2] ) || ( lA[3] != lB[3] ) )
+			{
+				return colorDistance ( lA , lB ) ;
+			}
+		}
+		if ( ! frontAndBack )
+		{
+			if ( backMatBind [ i ] == PER_VERTEX ) 
+			{
+		    lA = & backMaterial [ i ] [ indexA ] ;
+				lB = & backMaterial [ i ] [ indexB ] ;
+		    if ( ( lA[0] != lB[0] ) || ( lA[1] != lB[1] ) || ( lA[2] != lB[2] ) || ( lA[3] != lB[3] ) )
+		    {
+		    	return colorDistance ( lA , lB ) ;
+		    }
+			}
+		}
+	}
+	return 0 ;
+}
+
+
+static int isMultiColorTriplet ( 
+		int indexA , 
+		int indexB ,
+		int indexC ,
+		float * frontMaterial [ 5 ] ,
+		float * backMaterial [ 5 ] ,
+		int frontMatBind [ 5 ] , 
+		int backMatBind [ 5 ] ,
+		int frontAndBack )
+{
+	/*
+	 * 0 : all the same color
+	 * 1 : A is different
+	 * 2 : B is different
+	 * 3 : C is different
+	 * 4 : all different
+	 */
+ 
+	float lMultiColorAB ;
+	float lMultiColorBC ;
+	float lMultiColorCA ;
+	lMultiColorAB = isMultiColorDuplet ( indexA , indexB , 
+	                                     frontMaterial , backMaterial , 
+	                                     frontMatBind , backMatBind ,
+	                                     frontAndBack ) ;
+	lMultiColorBC = isMultiColorDuplet ( indexB , indexC ,
+	                                     frontMaterial , backMaterial , 
+	                                     frontMatBind , backMatBind ,
+	                                     frontAndBack ) ;
+	if ( lMultiColorAB == 0. )
+	{	/* A B are the same */
+		if ( lMultiColorBC == 0. )
+		{ /* B C are the same */
+			return 0 ; /* all the same */
+		}
+		else
+		{ /* B C are different */
+			return 3 ; /* C is different */
+		}
+	}
+    else 
+    {	/* A B are different */
+    	if ( lMultiColorBC == 0. )
+		{ /* B C are the same */
+		    return 1 ; /* A is different */
+		}
+		else
+		{ /* B C are different */
+			lMultiColorCA = isMultiColorDuplet ( indexC , indexA ,
+			                                     frontMaterial , backMaterial , 
+			                                     frontMatBind , backMatBind ,
+			                                     frontAndBack ) ;
+
+			if ( lMultiColorCA == 0. )
+			{ /* C A are the same */
+				return 2 ; /* B is different */
+			}
+			else
+			{ /* C A are different */
+				
+				if (lMultiColorAB < lMultiColorBC)
+				{
+					if (lMultiColorAB < lMultiColorCA)
+					{
+						return 43 ; /* ie C is different */
+					}
+					else
+					{
+						return 42 ; /* ie B is different */
+					}					
+				}
+				else
+				{
+					if (lMultiColorBC < lMultiColorCA)
+					{
+						return 41 ; /* ie A is different */
+					}
+					else
+					{
+						if ( (lMultiColorBC == lMultiColorCA) && (lMultiColorAB == lMultiColorBC) )
+						{
+							return 4 ; /* all different */
+						}
+						else
+						{
+							return 42 ; /* ie B is different */
+						}
+					}					
+				}
+			}
+		}
+	}
+}
+
+
+GLuint glDrawIndexedGeom(
+       int type, 
+       float *coordinates, int lencoord,
+			 int *indices, int lenind[2], 
+			 float * normals, int lennorm[2],
+			 float *texIndices, int lentexind[2],
+			 float *frontMaterial[5], int lenfm[5],
+			 float *backMaterial[5], int lenbm[5],
+			 int frontMatBind[5], int backMatBind[5],
+			 int frontAndBack,  int noLightCol,
+			 int sharpColorBoundaries, /*0: no sharp - 1: sharp with colordistance - 2: sharp without colordistance*/
+			 int preventIntelBug
+			 ,int * highlight, int lenhighlight
+			 )
+{
+  int  freeFrontMatBind=0, freeBackMatBind=0;
+  int i, j, k, l, v, fixed = 0, face, normBinding,
+      NONE = -1, OVERALL = 10, PER_VERTEX = 11, PER_PART = 12,
+      propConst[] = { GL_AMBIENT, GL_DIFFUSE, GL_EMISSION, GL_SPECULAR,
+		      GL_SHININESS };
+  int i4, v3, v4, ii, jj;
+
+  int lPreviousV3;
+  float lVx, lVy, lVz;
+
+  int lSharpColorBoundariesTriangles, lMultiColor, lFullPrevention ;
+
+  int lIndexA ;
+  int lIndexB ;
+  int lIndexC ;
+  int lIndexA3 ;
+  int lIndexB3 ;
+  int lIndexC3 ;
+  int lIndexA4 ;
+  int lIndexB4 ;
+  int lIndexC4 ;
+
+  float lCenterEdgeAB [ 3 ] ;
+  float lCenterEdgeBC [ 3 ] ;
+  float lCenterEdgeCA [ 3 ] ;
+  float lNormalEdgeAB [ 3 ] ;
+  float lNormalEdgeBC [ 3 ] ;
+  float lNormalEdgeCA [ 3 ] ;
+  float lCenterABC [ 3 ] ;
+  float lCenterNormalABC [ 3 ] ;
+  float lCenterSegment [ 3 ] ;
+  float lNormalSegment [ 3 ] ;
+
+  int lHighlightState ;
+  int lhighlight ;
+  
+  GLenum errcode;
+
+  if ( ( sharpColorBoundaries ) 
+    && ( lenind [ 1 ] == 3 ) 
+    && ( ! texIndices ) 
+    && ( frontMatBind ) 
+    && ( ( frontMatBind [ 0 ] == PER_VERTEX ) 
+      || ( frontMatBind [ 1 ] == PER_VERTEX )
+      || ( frontMatBind [ 2 ] == PER_VERTEX )
+      || ( frontMatBind [ 3 ] == PER_VERTEX )
+      || ( frontMatBind [ 4 ] == PER_VERTEX )
+      || ( ( ! frontAndBack ) 
+        && ( backMatBind ) 
+        && ( ( backMatBind [ 0 ] == PER_VERTEX )
+		  || ( backMatBind [ 1 ] == PER_VERTEX )
+		  || ( backMatBind [ 2 ] == PER_VERTEX )
+		  || ( backMatBind [ 3 ] == PER_VERTEX )
+		  || ( backMatBind [ 4 ] == PER_VERTEX ) 
+		   )
+		 )
+	   )
+     )
+  {
+  	lSharpColorBoundariesTriangles = 1 ;
+  }
+  else
+  {
+  	lSharpColorBoundariesTriangles = 0 ;
+  	lMultiColor = -1 ;
+  }
+
+	if ( preventIntelBug && lSharpColorBoundariesTriangles )
+	{
+		lFullPrevention = 1;
+	}
+	else
+	{
+		lFullPrevention = 0 ;
+	}
+	
+  if (texIndices)
+  {
+		if (lentexind[0] != lencoord)
+		{
+		  fprintf(stderr, "ERROR in glDrawIndexedGeom: Number of texture indices(%d) doesn't match number of vertices(%d)\n", lentexind[0], lencoord);
+		  return 0;
+		}
+  }
+
+  if (normals) 
+  {
+		if (lennorm[0] == lencoord) 
+			normBinding = PER_VERTEX;
+    else if (lennorm[0] == lenind[0]) 
+			normBinding = PER_PART;
+    else if (lennorm[0] == 1) 
+    	normBinding = OVERALL;
+    else normBinding = NONE;
+  }
+  else normBinding = NONE;
+  
+  /* check front material binding parameter */
+  if (frontMaterial) 
+  {
+		if (!frontMatBind) 
+		{
+	  	frontMatBind = (int *)malloc(5*sizeof(int));
+	  	freeFrontMatBind = 1; 
+	  	for (i=0; i<5; i++) 
+	    {
+	      if (lenfm[i] == lencoord)
+					frontMatBind[i]=PER_VERTEX;
+	      else if (lenfm[i] == lenind[0])
+					frontMatBind[i]=PER_PART;
+	      else if (lenfm[i] == 1) 
+					frontMatBind[i]=OVERALL;
+	      else lenfm[i] = 0;
+	    }
+		}
+  } 
+
+  /* check back material binding parameter */
+  if (backMaterial)
+  {
+    if (!backMatBind)
+		{
+		  backMatBind = (int *)malloc(5*sizeof(int));
+		  freeBackMatBind = 1; 
+		  for (i=0; i<5; i++)
+		  {
+		    if (lenbm[i] == lencoord)
+					backMatBind[i]=PER_VERTEX;
+		    else if (lenbm[i] == lenind[0])
+					backMatBind[i]=PER_PART;
+		    else if (lenbm[i] == 1)
+					backMatBind[i]=OVERALL;
+		    else lenbm[i] = 0;
+		  }
+		}
+  } 
+
+  if (!frontAndBack)
+		face = GL_FRONT;
+  else 
+		face = GL_FRONT_AND_BACK;
+
+	if (normBinding == OVERALL ) 
+	{ 
+		glNormal3fv( &normals[0] );  /* Overall Normal */
+	}
+
+	if (type==GL_LINES)
+	{
+	  glDisable(GL_LIGHTING);
+	} 
+
+	if ( lenhighlight > 0 )
+	{
+		glStencilFunc ( GL_ALWAYS, 0, 1 ) ;
+	}
+  lHighlightState = 0 ;
+
+  if (type==GL_LINES || type==GL_TRIANGLES || type==GL_QUADS)
+	{
+		fixed = 1;
+		glBegin((GLenum)type);   /* fixed length geom's ==> vertices cannot be picked */
+	}
+  /* initialize color memory */
+  isNewColor(NULL,1);
+  isNewMaterial(0,0,NULL,1);
+  l = lenind[1];
+  /* loop over faces */
+  for (i=0; i<lenind[0]; i++)
+	{
+    i4 = i * 4 ; 
+    if (normBinding == PER_PART)
+    {
+    	glNormal3fv( &normals[i*3] ); /* PER_PART */
+    }
+      
+    /* set PER_PART color/material properties */
+	
+	  if (frontMaterial)
+    {
+      if (frontMatBind[noLightCol] == PER_PART)
+      {
+				if ( isNewColor(&frontMaterial[noLightCol][i4],1) )
+		  	{
+		    	glColor4fv( &frontMaterial[noLightCol][i4] );
+		  	}
+      }
+      if ( preventIntelBug == 0 )
+      {
+	      for (j=0; j<5; j++)
+				{
+		  		if (frontMatBind[j] == PER_PART)
+		  		{
+						if (j == 4) ii = i;
+						else ii = i4; 
+		    		if ( preventIntelBug || isNewMaterial( face, j, &frontMaterial[j][ii],1) )
+		      	{
+							glMaterialfv( (GLenum)face, (GLenum)propConst[j], &frontMaterial[j][ii] );
+		      	}
+		  		}
+				}
+			}
+    }
+  	if ( ( preventIntelBug == 0 ) && backMaterial && !frontAndBack)
+    {
+      for (j=0; j<5; j++) 
+			{
+			  if (backMatBind[j] == PER_PART)
+			  {
+					if (j == 4) ii = i;
+					else ii = i4; 
+			    if ( preventIntelBug || isNewMaterial( GL_BACK, j, &backMaterial[j][ii],1) )
+			    {
+						glMaterialfv( GL_BACK, (GLenum)propConst[j], &backMaterial[j][ii] );
+			    }
+			  }
+			}
+		}
+      
+		if ( lSharpColorBoundariesTriangles ) 
+		{
+      lIndexA = indices [ i * l + 0 ] ;
+      lIndexB = indices [ i * l + 1 ] ;
+      lIndexC = indices [ i * l + 2 ] ;
+      lIndexA4 = 4 * lIndexA ;
+      lIndexB4 = 4 * lIndexB ;
+      lIndexC4 = 4 * lIndexC ;
+      lMultiColor = isMultiColorTriplet (
+		    lIndexA4 , 
+		    lIndexB4 ,
+		    lIndexC4 ,
+			frontMaterial ,
+			backMaterial ,
+			frontMatBind ,
+			backMatBind ,
+			frontAndBack ) ;
+
+			if ( lMultiColor != 0 )
+		  {
+		  	if ( ( lMultiColor > 40 ) && ( sharpColorBoundaries == 2 ) )
+		  	{
+		  		lMultiColor = 4 ;
+		  	}
+		  	
+	      lIndexA3 = 3 * lIndexA ;
+	      lIndexB3 = 3 * lIndexB ;
+	      lIndexC3 = 3 * lIndexC ;
+			  if ( lMultiColor == 1 )
+			  {
+				  lCenterEdgeAB[0] = .5 * ( (&coordinates[lIndexA3])[0] + (&coordinates[lIndexB3])[0] ) ;
+				  lCenterEdgeAB[1] = .5 * ( (&coordinates[lIndexA3])[1] + (&coordinates[lIndexB3])[1] ) ;
+			    lCenterEdgeAB[2] = .5 * ( (&coordinates[lIndexA3])[2] + (&coordinates[lIndexB3])[2] ) ;
+				  lCenterEdgeCA[0] = .5 * ( (&coordinates[lIndexC3])[0] + (&coordinates[lIndexA3])[0] ) ;
+				  lCenterEdgeCA[1] = .5 * ( (&coordinates[lIndexC3])[1] + (&coordinates[lIndexA3])[1] ) ;
+			    lCenterEdgeCA[2] = .5 * ( (&coordinates[lIndexC3])[2] + (&coordinates[lIndexA3])[2] ) ;
+			    if (normBinding == PER_VERTEX)
+			    {
+					  lNormalEdgeAB[0] = .5 * ( (&normals[lIndexA3])[0] + (&normals[lIndexB3])[0] ) ;
+					  lNormalEdgeAB[1] = .5 * ( (&normals[lIndexA3])[1] + (&normals[lIndexB3])[1] ) ;
+					  lNormalEdgeAB[2] = .5 * ( (&normals[lIndexA3])[2] + (&normals[lIndexB3])[2] ) ;
+					  lNormalEdgeCA[0] = .5 * ( (&normals[lIndexC3])[0] + (&normals[lIndexA3])[0] ) ;
+					  lNormalEdgeCA[1] = .5 * ( (&normals[lIndexC3])[1] + (&normals[lIndexA3])[1] ) ;
+					  lNormalEdgeCA[2] = .5 * ( (&normals[lIndexC3])[2] + (&normals[lIndexA3])[2] ) ;
+			    }
+			    
+			  }
+			  else if ( lMultiColor == 2 )
+			  {
+				  lCenterEdgeAB[0] = .5 * ( (&coordinates[lIndexA3])[0] + (&coordinates[lIndexB3])[0] ) ;
+				  lCenterEdgeAB[1] = .5 * ( (&coordinates[lIndexA3])[1] + (&coordinates[lIndexB3])[1] ) ;
+			    lCenterEdgeAB[2] = .5 * ( (&coordinates[lIndexA3])[2] + (&coordinates[lIndexB3])[2] ) ;
+				  lCenterEdgeBC[0] = .5 * ( (&coordinates[lIndexB3])[0] + (&coordinates[lIndexC3])[0] ) ;
+				  lCenterEdgeBC[1] = .5 * ( (&coordinates[lIndexB3])[1] + (&coordinates[lIndexC3])[1] ) ;
+			    lCenterEdgeBC[2] = .5 * ( (&coordinates[lIndexB3])[2] + (&coordinates[lIndexC3])[2] ) ;
+			    if (normBinding == PER_VERTEX)
+			    {
+					  lNormalEdgeAB[0] = .5 * ( (&normals[lIndexA3])[0] + (&normals[lIndexB3])[0] ) ;
+					  lNormalEdgeAB[1] = .5 * ( (&normals[lIndexA3])[1] + (&normals[lIndexB3])[1] ) ;
+					  lNormalEdgeAB[2] = .5 * ( (&normals[lIndexA3])[2] + (&normals[lIndexB3])[2] ) ;
+					  lNormalEdgeBC[0] = .5 * ( (&normals[lIndexB3])[0] + (&normals[lIndexC3])[0] ) ;
+					  lNormalEdgeBC[1] = .5 * ( (&normals[lIndexB3])[1] + (&normals[lIndexC3])[1] ) ;
+					  lNormalEdgeBC[2] = .5 * ( (&normals[lIndexB3])[2] + (&normals[lIndexC3])[2] ) ;
+			    }
+
+			  }
+			  else if ( lMultiColor == 3 )
+			  {
+				  lCenterEdgeBC[0] = .5 * ( (&coordinates[lIndexB3])[0] + (&coordinates[lIndexC3])[0] ) ;
+				  lCenterEdgeBC[1] = .5 * ( (&coordinates[lIndexB3])[1] + (&coordinates[lIndexC3])[1] ) ;
+			    lCenterEdgeBC[2] = .5 * ( (&coordinates[lIndexB3])[2] + (&coordinates[lIndexC3])[2] ) ;
+				  lCenterEdgeCA[0] = .5 * ( (&coordinates[lIndexC3])[0] + (&coordinates[lIndexA3])[0] ) ;
+				  lCenterEdgeCA[1] = .5 * ( (&coordinates[lIndexC3])[1] + (&coordinates[lIndexA3])[1] ) ;
+			    lCenterEdgeCA[2] = .5 * ( (&coordinates[lIndexC3])[2] + (&coordinates[lIndexA3])[2] ) ;
+			    if (normBinding == PER_VERTEX)
+			    {
+					  lNormalEdgeBC[0] = .5 * ( (&normals[lIndexB3])[0] + (&normals[lIndexC3])[0] ) ;
+					  lNormalEdgeBC[1] = .5 * ( (&normals[lIndexB3])[1] + (&normals[lIndexC3])[1] ) ;
+					  lNormalEdgeBC[2] = .5 * ( (&normals[lIndexB3])[2] + (&normals[lIndexC3])[2] ) ;
+					  lNormalEdgeCA[0] = .5 * ( (&normals[lIndexC3])[0] + (&normals[lIndexA3])[0] ) ;
+					  lNormalEdgeCA[1] = .5 * ( (&normals[lIndexC3])[1] + (&normals[lIndexA3])[1] ) ;
+					  lNormalEdgeCA[2] = .5 * ( (&normals[lIndexC3])[2] + (&normals[lIndexA3])[2] ) ;
+			    }
+
+			  }
+			  else if ( ( lMultiColor == 4 ) || ( lMultiColor > 40 ) )
+			  {
+				  lCenterEdgeAB[0] = .5 * ( (&coordinates[lIndexA3])[0] + (&coordinates[lIndexB3])[0] ) ;
+				  lCenterEdgeAB[1] = .5 * ( (&coordinates[lIndexA3])[1] + (&coordinates[lIndexB3])[1] ) ;
+			    lCenterEdgeAB[2] = .5 * ( (&coordinates[lIndexA3])[2] + (&coordinates[lIndexB3])[2] ) ;
+				  lCenterEdgeBC[0] = .5 * ( (&coordinates[lIndexB3])[0] + (&coordinates[lIndexC3])[0] ) ;
+				  lCenterEdgeBC[1] = .5 * ( (&coordinates[lIndexB3])[1] + (&coordinates[lIndexC3])[1] ) ;
+			    lCenterEdgeBC[2] = .5 * ( (&coordinates[lIndexB3])[2] + (&coordinates[lIndexC3])[2] ) ;
+				  lCenterEdgeCA[0] = .5 * ( (&coordinates[lIndexC3])[0] + (&coordinates[lIndexA3])[0] ) ;
+				  lCenterEdgeCA[1] = .5 * ( (&coordinates[lIndexC3])[1] + (&coordinates[lIndexA3])[1] ) ;
+			    lCenterEdgeCA[2] = .5 * ( (&coordinates[lIndexC3])[2] + (&coordinates[lIndexA3])[2] ) ;
+			    if (normBinding == PER_VERTEX)
+			    {
+					  lNormalEdgeAB[0] = .5 * ( (&normals[lIndexA3])[0] + (&normals[lIndexB3])[0] ) ;
+					  lNormalEdgeAB[1] = .5 * ( (&normals[lIndexA3])[1] + (&normals[lIndexB3])[1] ) ;
+					  lNormalEdgeAB[2] = .5 * ( (&normals[lIndexA3])[2] + (&normals[lIndexB3])[2] ) ;
+					  lNormalEdgeBC[0] = .5 * ( (&normals[lIndexB3])[0] + (&normals[lIndexC3])[0] ) ;
+					  lNormalEdgeBC[1] = .5 * ( (&normals[lIndexB3])[1] + (&normals[lIndexC3])[1] ) ;
+					  lNormalEdgeBC[2] = .5 * ( (&normals[lIndexB3])[2] + (&normals[lIndexC3])[2] ) ;
+					  lNormalEdgeCA[0] = .5 * ( (&normals[lIndexC3])[0] + (&normals[lIndexA3])[0] ) ;
+					  lNormalEdgeCA[1] = .5 * ( (&normals[lIndexC3])[1] + (&normals[lIndexA3])[1] ) ;
+					  lNormalEdgeCA[2] = .5 * ( (&normals[lIndexC3])[2] + (&normals[lIndexA3])[2] ) ;
+			    }
+			    
+			    if ( lMultiColor == 4 )
+			    {
+			      lCenterABC[0] = .3333333333333333333333333333333 * 
+					                  (  (&coordinates[lIndexA3])[0] 
+					                   + (&coordinates[lIndexB3])[0] 
+					                   + (&coordinates[lIndexC3])[0] ) ;
+			      lCenterABC[1] = .3333333333333333333333333333333 * 
+					                  (  (&coordinates[lIndexA3])[1] 
+					                   + (&coordinates[lIndexB3])[1] 
+					                   + (&coordinates[lIndexC3])[1] ) ;
+			      lCenterABC[2] = .3333333333333333333333333333333 * 
+					                  (  (&coordinates[lIndexA3])[2] 
+					                   + (&coordinates[lIndexB3])[2] 
+					                   + (&coordinates[lIndexC3])[2] ) ;
+			      lCenterNormalABC[0] = .3333333333333333333333333333333 * 
+									                (  (&normals[lIndexA3])[0] 
+									                 + (&normals[lIndexB3])[0] 
+									                 + (&normals[lIndexC3])[0] ) ;
+			      lCenterNormalABC[1] = .3333333333333333333333333333333 * 
+									                (  (&normals[lIndexA3])[1] 
+									                 + (&normals[lIndexB3])[1] 
+									                 + (&normals[lIndexC3])[1] ) ;
+			      lCenterNormalABC[2] = .3333333333333333333333333333333 * 
+									                (  (&normals[lIndexA3])[2] 
+									                 + (&normals[lIndexB3])[2] 
+									                 + (&normals[lIndexC3])[2] ) ;
+			    }
+				  else if ( lMultiColor == 41 )
+				  {
+					  lCenterSegment[0] = .5 * ( lCenterEdgeAB[0] + lCenterEdgeCA[0] ) ;
+					  lCenterSegment[1] = .5 * ( lCenterEdgeAB[1] + lCenterEdgeCA[1] ) ;
+				    lCenterSegment[2] = .5 * ( lCenterEdgeAB[2] + lCenterEdgeCA[2] ) ;
+				    if (normBinding == PER_VERTEX)
+				    {
+						  lNormalSegment[0] = .5 * ( lNormalEdgeAB[0] + lNormalEdgeCA[0] ) ;
+						  lNormalSegment[1] = .5 * ( lNormalEdgeAB[1] + lNormalEdgeCA[1] ) ;
+						  lNormalSegment[2] = .5 * ( lNormalEdgeAB[2] + lNormalEdgeCA[2] ) ;
+				    }
+				  }
+				  else if ( lMultiColor == 42 )
+				  {
+					  lCenterSegment[0] = .5 * ( lCenterEdgeAB[0] + lCenterEdgeBC[0] ) ;
+					  lCenterSegment[1] = .5 * ( lCenterEdgeAB[1] + lCenterEdgeBC[1] ) ;
+				    lCenterSegment[2] = .5 * ( lCenterEdgeAB[2] + lCenterEdgeBC[2] ) ;
+				    if (normBinding == PER_VERTEX)
+				    {
+						  lNormalSegment[0] = .5 * ( lNormalEdgeAB[0] + lNormalEdgeBC[0] ) ;
+						  lNormalSegment[1] = .5 * ( lNormalEdgeAB[1] + lNormalEdgeBC[1] ) ;
+						  lNormalSegment[2] = .5 * ( lNormalEdgeAB[2] + lNormalEdgeBC[2] ) ;
+				    }
+				  }
+				  else if ( lMultiColor == 43 )
+				  {
+					  lCenterSegment[0] = .5 * ( lCenterEdgeBC[0] + lCenterEdgeCA[0] ) ;
+					  lCenterSegment[1] = .5 * ( lCenterEdgeBC[1] + lCenterEdgeCA[1] ) ;
+				    lCenterSegment[2] = .5 * ( lCenterEdgeBC[2] + lCenterEdgeCA[2] ) ;
+				    if (normBinding == PER_VERTEX)
+				    {
+						  lNormalSegment[0] = .5 * ( lNormalEdgeBC[0] + lNormalEdgeCA[0] ) ;
+						  lNormalSegment[1] = .5 * ( lNormalEdgeBC[1] + lNormalEdgeCA[1] ) ;
+						  lNormalSegment[2] = .5 * ( lNormalEdgeBC[2] + lNormalEdgeCA[2] ) ;
+				    }
+				  }
+			    
+			  }
+		  }
+    }
+    else if ( ! fixed ) 
+		{
+		  glPushName(i);
+  	  glBegin((GLenum)type);
+		}
+
+//############################################
+		if ( lenhighlight > 0 )
+		{
+			lhighlight = 1 ;
+			for ( j = 0 ; j < l ; j ++ )
+			{
+				v = indices [ i * l + j ] ;
+				if ( highlight [ v ] == 0 )
+				{
+					lhighlight = 0 ;
+					break ;
+				}
+			}
+
+			if ( lHighlightState == 0 )
+			{
+				if ( lhighlight == 1 )
+				{
+					if ( fixed )
+					{
+						glEnd ( ) ;
+					}
+	        glStencilFunc ( GL_ALWAYS , 1 , 1 ) ;
+					lHighlightState = 1 ;
+					if ( fixed )
+					{
+						glBegin ( ( GLenum ) type ) ;
+					}
+				}
+			}
+			else
+			{
+				if ( lhighlight == 0 )
+				{
+					if ( fixed )
+					{
+						glEnd ( ) ;
+					}
+	        glStencilFunc ( GL_ALWAYS , 0 , 1 ) ;
+					lHighlightState = 0 ;
+					if ( fixed )
+					{
+						glBegin ( ( GLenum ) type ) ;
+					}
+				}
+			}
+		}
+//############################################
+
+
+    /* loop over vertices in face */
+    for (j=0; j<l; j++) 
+		{
+
+			if (preventIntelBug && ! lSharpColorBoundariesTriangles)
+			{
+			  if (frontMaterial)
+		    {
+		      for (jj=0; jj<5; jj++)
+					{
+			  		if (frontMatBind[jj] == PER_PART)
+			  		{
+							if (jj == 4) ii = i;
+							else ii = i4; 
+							glMaterialfv( (GLenum)face, (GLenum)propConst[jj], &frontMaterial[jj][ii] );
+			  		}
+					}
+		    }
+		  	if (backMaterial && !frontAndBack)
+		    {
+		      for (jj=0; jj<5; jj++) 
+					{
+					  if (backMatBind[jj] == PER_PART)
+					  {
+							if (jj == 4) ii = i;
+							else ii = i4; 
+							glMaterialfv( GL_BACK, (GLenum)propConst[jj], &backMaterial[jj][ii] );
+					  }
+					}
+				}
+			}
+
+		  v = indices[i*l+j];
+		  if (v < 0) break;
+		  v3 = v * 3 ;
+		  v4 = v * 4 ;
+		  
+		  if ( v >= lencoord ) 
+		  {
+	      fprintf(stderr, "ERROR in glDrawIndexedGeom: Coordinates index %d in face %d out of range %d\n", v, j, lencoord);
+	      return 0;
+		  }
+		    
+		  if (frontMaterial) 
+			{
+			  if ( ( (frontMatBind [ noLightCol ] == PER_VERTEX) && isNewColor( &frontMaterial[ noLightCol ][ v4 ] , 0) )
+			    || ( (frontMatBind [ 0 ] == PER_VERTEX) && (preventIntelBug || isNewMaterial(face, 0, &frontMaterial[ 0 ][ v4 ], 0)) )
+			    || ( (frontMatBind [ 1 ] == PER_VERTEX) && (preventIntelBug || isNewMaterial(face, 1, &frontMaterial[ 1 ][ v4 ], 0)) )
+			    || ( (frontMatBind [ 2 ] == PER_VERTEX) && (preventIntelBug || isNewMaterial(face, 2, &frontMaterial[ 2 ][ v4 ], 0)) )
+			    || ( (frontMatBind [ 3 ] == PER_VERTEX) && (preventIntelBug || isNewMaterial(face, 3, &frontMaterial[ 3 ][ v4 ], 0)) )
+			    || ( (frontMatBind [ 4 ] == PER_VERTEX) && (preventIntelBug || isNewMaterial(face, 4, &frontMaterial[ 4 ][ v ], 0)) )
+			  )
+		    {
+		    	if ( ( sharpColorBoundaries ) 
+		      	  && ( (type == GL_LINES) || (l == 2) )
+		      	  && ( j > 0 ) 
+		      	   )
+		      {
+	      		lPreviousV3 = 3 * indices [ i * l + ( j - 1 ) ] ;
+            lVx = .5 * ( (&coordinates[v3])[0] + (&coordinates[lPreviousV3])[0] ) ;
+            lVy = .5 * ( (&coordinates[v3])[1] + (&coordinates[lPreviousV3])[1] ) ;
+            lVz = .5 * ( (&coordinates[v3])[2] + (&coordinates[lPreviousV3])[2] ) ;
+      	    glVertex3f ( lVx , lVy , lVz ) ;
+      	    if ( (frontMatBind [ noLightCol ] == PER_VERTEX) && isNewColor( &frontMaterial[ noLightCol ][ v4 ],1 ) )
+      	    {
+			    	    glColor4fv( &frontMaterial[noLightCol][v4] );
+      	    }
+			  		for (k=0; k<5; k++) 
+			    	{
+			      	if (frontMatBind[k] == PER_VERTEX)
+			      	{
+								if (k == 4) ii = v;
+								else ii = v4;
+								if ( preventIntelBug || isNewMaterial( face, k, &frontMaterial[k][ii],1) )
+							  {
+							    glMaterialfv( (GLenum)face, (GLenum)propConst[k], &frontMaterial[k][ii] );
+							  }
+			      	}
+			    	}
+      	    glVertex3f ( lVx , lVy , lVz ) ;
+		      }
+	      	else if ( (frontMatBind [ noLightCol ] == PER_VERTEX) && isNewColor( &frontMaterial[ noLightCol ][ v4 ],1 ) )
+	      	{
+		    		glColor4fv( &frontMaterial[noLightCol][v4] );
+	      	}
+		    }
+
+				if ( ! lFullPrevention )
+				{
+		  		for (k=0; k<5; k++) 
+		    	{
+		      	if (frontMatBind[k] == PER_VERTEX)
+		      	{
+							if (k == 4) ii = v;
+							else ii = v4;
+							if ( preventIntelBug || isNewMaterial( face, k, &frontMaterial[k][ii],1) )
+						  {
+						    glMaterialfv( (GLenum)face, (GLenum)propConst[k], &frontMaterial[k][ii] );
+						  }
+		      	}
+		    	}
+				}
+			}
+
+      if (backMaterial && ! frontAndBack && ! lFullPrevention )
+			{
+	  		for (k=0; k<5; k++)
+		    {
+		      if (backMatBind[k] == PER_VERTEX)
+		      {
+						if (k == 4) ii = v;
+						else ii = v4;
+						if ( preventIntelBug || isNewMaterial( GL_BACK, k, &backMaterial[k][ii],1) ) 
+		  			{
+		    			glMaterialfv( GL_BACK, (GLenum)propConst[k], &backMaterial[k][ii] );
+		  			}
+		      }
+	    	}
+			}
+
+	  	if (texIndices)
+	    {
+	      switch(lentexind[1])
+				{
+					case 1: glTexCoord1f(texIndices[v]); break;
+					case 2: glTexCoord2fv(&texIndices[v*2]); break;
+					case 3: glTexCoord3fv(&texIndices[v3]); break;
+					case 4: glTexCoord4fv(&texIndices[v4]); break;
+				}
+	    }
+
+		  if ( (lSharpColorBoundariesTriangles==0) || (lMultiColor==0) )
+		  {
+		  	if (normBinding == PER_VERTEX)
+		    {
+		      if ( v >= lennorm[0] ) 
+					{
+			  		fprintf(stderr, "ERROR in glDrawIndexedGeom: Normal index %d in face %d out of range %d\n", v, j, lennorm[0]);
+			  		return 0;
+					}
+		      glNormal3fv( &normals[v3] );
+		    }
+
+	    	if (lFullPrevention )
+	    	  reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    glVertex3fv(&coordinates[v3]);
+		  }
+		  else if ( lMultiColor == 1 )
+		  {
+  	    if ( j == 0 )
+  	    {
+  	    	if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv( &normals[v3] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    glVertex3fv(&coordinates[v3]);
+  	    }
+  	    else /* if ( j == 1 ) as we break the for loop at the end */ 
+  	    {
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+					glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexB3 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexB3 ] ) ;
+
+
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexB3 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexC3 ] ) ;			    
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    glVertex3fv ( & coordinates [ lIndexC3 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+			    break ;
+  	    }
+		  }
+		  else if ( lMultiColor == 2 )
+		  {
+  	    if ( j == 0 )
+  	    {
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexC3 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexC3 ] ) ;
+	  	    
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexC3 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexA3 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+					glVertex3fv ( & coordinates [ lIndexA3 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+  	    }
+  	    else  /* if ( j == 1 ) as we break the for loop at the end */ 
+  	    {
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv( &normals[v3] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    glVertex3fv(&coordinates[v3]);
+			    break ;
+  	    }
+		  }
+		  else if ( lMultiColor == 3 )
+		  {
+  	    if ( j == 0 )
+  	    {
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+					glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexA3 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexA3 ] ) ;
+
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    	glVertex3fv ( & coordinates [ lIndexA3 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv ( & normals [ lIndexB3 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    glVertex3fv ( & coordinates [ lIndexB3 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+  	    }
+  	    else if ( j == 2 ) /* otherwise it won't be the right material */ 
+  	    {
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+	    		if (normBinding == PER_VERTEX)
+	    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+	  	    if (normBinding == PER_VERTEX)
+	    			glNormal3fv( &normals[v3] ) ;
+		    	if (lFullPrevention )
+	    	    reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    glVertex3fv(&coordinates[v3]);
+  	    }
+		  }
+		  else if ( lMultiColor == 4 )
+		  {
+  	    switch ( j )
+  	    {
+  	    	case 0:
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	      reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		break;
+  	    	case 1:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		break;
+  	    	case 2:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+						glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		break;
+  	    }
+  	    if (normBinding == PER_VERTEX)
+	    		glNormal3fv( &normals[v3] ) ;
+    	  if (lFullPrevention )
+  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    	glVertex3fv(&coordinates[v3]);
+
+  	    if (normBinding == PER_VERTEX)
+	    		glNormal3f ( lCenterNormalABC[0] , lCenterNormalABC[1] , lCenterNormalABC[2] ) ;
+    	  if (lFullPrevention )
+  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+  	    glVertex3f ( lCenterABC[0] , lCenterABC[1] , lCenterABC[2] ) ;
+  	    switch ( j )
+  	    {
+  	    	case 0:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		break;
+  	    	case 1:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		break;
+  	    	case 2:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		break;
+				}
+		  }
+			else if ( lMultiColor == 41 )
+			{
+  	    switch ( j )
+  	    {
+  	    	case 0:
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+		    	  if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+		  	    if (normBinding == PER_VERTEX)
+			    		glNormal3fv( &normals[v3] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    	glVertex3fv(&coordinates[v3]);
+			    	
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		break;
+  	    	case 1:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		break;
+  	    	case 2:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+						glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		break;
+  	    }
+  	    if (normBinding == PER_VERTEX)
+	    		glNormal3fv( &normals[v3] ) ;
+	    	if (lFullPrevention )
+  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    	glVertex3fv(&coordinates[v3]);
+
+				if (j != 0)
+				{
+
+	  	    if (normBinding == PER_VERTEX)
+		    		glNormal3f ( lNormalSegment[0] , lNormalSegment[1] , lNormalSegment[2] ) ;
+		    	if (lFullPrevention )
+    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	  	    glVertex3f ( lCenterSegment[0] , lCenterSegment[1] , lCenterSegment[2] ) ;
+	  	    switch ( j )
+	  	    {
+	  	    	case 1:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+			    		break;
+	  	    	case 2:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+			    		break;
+	  	    }
+				}
+			}
+			else if ( lMultiColor == 42 )
+			{
+  	    switch ( j )
+  	    {
+  	    	case 0:
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		break;
+  	    	case 1:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+		  	    if (normBinding == PER_VERTEX)
+			    		glNormal3fv( &normals[v3] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    	glVertex3fv(&coordinates[v3]);
+			  
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		break;
+  	    	case 2:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+						glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		break;
+  	    }
+  	    if (normBinding == PER_VERTEX)
+	    		glNormal3fv( &normals[v3] ) ;
+	    	if (lFullPrevention )
+  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    	glVertex3fv(&coordinates[v3]);
+
+				if (j != 1)
+				{
+	  	    if (normBinding == PER_VERTEX)
+		    		glNormal3f ( lNormalSegment[0] , lNormalSegment[1] , lNormalSegment[2] ) ;
+		    	if (lFullPrevention )
+	  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	  	    glVertex3f ( lCenterSegment[0] , lCenterSegment[1] , lCenterSegment[2] ) ;
+	  	    switch ( j )
+	  	    {
+	  	    	case 0:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+			    		break;
+	  	    	case 2:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    		if (lFullPrevention )
+	    	  		  reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    		if (lFullPrevention )
+	    	  		 reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+			    		break;
+	  	    }
+				}
+			}
+			else if ( lMultiColor == 43 )
+			{
+  	    switch ( j )
+  	    {
+  	    	case 0:
+		    		if (normBinding == PER_VERTEX)
+		    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		break;
+  	    	case 1:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+		    		break;
+  	    	case 2:
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+
+		  	    if (normBinding == PER_VERTEX)
+			    		glNormal3fv( &normals[v3] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    	glVertex3fv(&coordinates[v3]);
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalSegment [ 0 ] , lNormalSegment [ 1 ] , lNormalSegment [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+		    		glVertex3f ( lCenterSegment [ 0 ] , lCenterSegment [ 1 ] , lCenterSegment [ 2 ] ) ;
+		    		if (normBinding == PER_VERTEX)
+	    			  glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+			    	if (lFullPrevention )
+	    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+						glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+		    		break;
+  	    }
+  	    if ( normBinding == PER_VERTEX )
+	    		glNormal3fv( &normals[v3] ) ;
+	    	if (lFullPrevention )
+  	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	    	glVertex3fv(&coordinates[v3]);
+
+				if (j != 2)
+				{
+	  	    if (normBinding == PER_VERTEX)
+		    		glNormal3f ( lNormalSegment[0] , lNormalSegment[1] , lNormalSegment[2] ) ;
+		    	if (lFullPrevention )
+    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+	  	    glVertex3f ( lCenterSegment[0] , lCenterSegment[1] , lCenterSegment[2] ) ;
+	  	    switch ( j )
+	  	    {
+	  	    	case 0:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeCA [ 0 ] , lNormalEdgeCA [ 1 ] , lNormalEdgeCA [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeCA [ 0 ] , lCenterEdgeCA [ 1 ] , lCenterEdgeCA [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+			    		break;
+	  	    	case 1:
+			    		if (normBinding == PER_VERTEX)
+		    			  glNormal3f ( lNormalEdgeAB [ 0 ] , lNormalEdgeAB [ 1 ] , lNormalEdgeAB [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeAB [ 0 ] , lCenterEdgeAB [ 1 ] , lCenterEdgeAB [ 2 ] ) ;
+			    		if (normBinding == PER_VERTEX)
+			    			glNormal3f ( lNormalEdgeBC [ 0 ] , lNormalEdgeBC [ 1 ] , lNormalEdgeBC [ 2 ] ) ;
+				    	if (lFullPrevention )
+		    	  		reapplyMaterial( v , frontMaterial , backMaterial , frontMatBind , backMatBind , frontAndBack ) ;
+			    		glVertex3f ( lCenterEdgeBC [ 0 ] , lCenterEdgeBC [ 1 ] , lCenterEdgeBC [ 2 ] ) ;
+			    		break;
+	  	    }
+				}
+		  }
+		}
+      
+    if (!fixed) 
+		{
+		  glEnd();
+		  glPopName();
+		}
+  }
+  
+  if (fixed) 
+  {
+  	glEnd();
+  }
+  
+	if ( lHighlightState == 1 )
+	{
+		glStencilFunc ( GL_ALWAYS, 0, 1 ) ;
+	}
+
+  /** glEndList(); **/
+  
+  if (freeFrontMatBind) free(frontMatBind);
+  if (freeBackMatBind) free(backMatBind);
+
+  errcode = glGetError();
+  if (errcode!=GL_NO_ERROR)
+    printf("%s by glDrawIndexedGeom\n", gluErrorString( errcode ) );
+  
+  /** return dpl; **/
+  return 1;
+}
+
+
+GLuint glDrawSphereSet(int oneSphDSPL, float * coordinates, int lencoord, 
+		       float *frontMaterial[5], int lenfm[5],
+		       float *backMaterial[5],  int lenbm[5],
+		       int frontMatBind[5], int backMatBind[5],
+		       int frontAndBack, int noLightCol,
+		       int fillMode, int slices, int stacks,
+		       int * highlight, int lenhighlight)
+    
+{
+  int freeFrontMatBind = 0, freeBackMatBind=0;
+  /** GLuint dpl; **/
+  int i, j, face,
+      NONE = -1, OVERALL = 10, PER_VERTEX = 11, PER_PART = 12,
+      propConst[] = { GL_AMBIENT, GL_DIFFUSE, GL_EMISSION, GL_SPECULAR,
+		      GL_SHININESS };
+   int i4;
+   int ii ;
+   int lHighlightState ;
+
+   GLenum errcode;
+  /* check front material binding parameter */
+  if (frontMaterial)
+    {
+      if (!frontMatBind)
+	{
+	  frontMatBind = (int *)malloc(5*sizeof(int));
+	  freeFrontMatBind = 1; 
+	  for (i=0; i<5; i++) 
+	    {
+	      if (lenfm[i] == lencoord) 
+		frontMatBind[i]=PER_PART;
+	      else if (lenfm[i] == 1) frontMatBind[i]=OVERALL;
+	    }
+	}
+    }
+
+  /* check back material binding parameter */
+  if (backMaterial)
+    {
+      if (!backMatBind)
+	{
+	  backMatBind = (int *)malloc(5*sizeof(int));
+	  freeBackMatBind = 1;
+	  for (i=0; i<5; i++) 
+	    {
+	      if (lenbm[i] == lencoord)
+		backMatBind[i]=PER_PART;
+	      else if (lenbm[i] == 1) backMatBind[i]=OVERALL;
+	    }
+	}
+    }
+
+  /** dpl = glGenLists(1); **/
+  /** glNewList(dpl, GL_COMPILE_AND_EXECUTE); **/
+
+  if (!frontAndBack)
+    face = GL_FRONT;
+  else
+    face = GL_FRONT_AND_BACK;
+  
+//  if (fillMode == GL_LINES)
+//    {
+//      glDisable(GL_LIGHTING);
+//      /*    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); */
+//    } 
+//  else
+//    glEnable(GL_LIGHTING);
+
+  /* initialize color memory */
+  isNewColor(NULL,1);
+  isNewMaterial(0,0,NULL,1);
+  
+	if ( lenhighlight > 0 )
+	{
+		glStencilFunc ( GL_ALWAYS, 0, 1 ) ;
+	}
+  lHighlightState = 0 ;
+
+  /* loop over spheres */
+  
+	for (i=0; i<lencoord; i++) 
+    {
+		/* set PER_PART (e.g. per sphere) color/material properties */
+      
+		i4 = i * 4 ;
+		if (frontMaterial) 
+		{
+			if (frontMatBind[noLightCol] == PER_PART)
+			{
+				if ( isNewColor(&frontMaterial[noLightCol][i4],1) ) 
+				{
+					glColor4fv( &frontMaterial[noLightCol][i4] );
+				}
+			}
+		}
+      
+		if ( (fillMode != GL_LINES) && (fillMode != GL_POINTS) )
+		{
+			if (frontMaterial) 
+			{
+				for (j=0; j<5; j++) 
+				{
+					if (frontMatBind[j] == PER_PART) 
+					{
+						if (j == 4) ii = i;
+						else ii = i4; 
+						if ( isNewMaterial( face, j, &frontMaterial[j][ii],1) ) 
+						{
+							glMaterialfv( (GLenum)face, (GLenum)propConst[j], 
+										  &frontMaterial[j][ii] );
+						}
+					}
+				}
+			}
+			if (backMaterial && !frontAndBack)
+			{
+				for (j=0; j<5; j++) 
+				{
+					if (backMatBind[noLightCol] == PER_PART) 
+					{
+						if (j == 4) ii = i;
+						else ii = i4; 
+						if ( isNewMaterial( GL_BACK, j, &backMaterial[j][ii],1) )
+						{
+							glMaterialfv( GL_BACK, (GLenum)propConst[j], &backMaterial[j][ii] );
+						}
+					}
+				}
+			}
+		}
+      
+		glPushName(i);
+		glPushMatrix();
+		glTranslatef(coordinates[i4], coordinates[i4+1], coordinates[i4+2]);
+		glScalef(coordinates[i4+3], coordinates[i4+3], coordinates[i4+3]);
+
+		if ( lenhighlight > 0 )
+		{
+			if ( lHighlightState == 0 )
+			{
+				if ( highlight [ i ] != 0 )
+				{
+	        glStencilFunc(GL_ALWAYS, 1, 1) ;
+					lHighlightState = 1 ;
+				}
+			}
+			else
+			{
+				if ( highlight [ i ] == 0 )
+				{
+	        glStencilFunc(GL_ALWAYS, 0, 1) ;
+					lHighlightState = 0 ;
+				}
+			}
+		}
+
+		glCallList(oneSphDSPL);
+		/*    extractedGlutSolidSphere(coordinates[i*4+3], slices, stacks); */
+		glPopMatrix();
+		glPopName();
+	}
+
+	if ( lHighlightState == 1 )
+	{
+		glStencilFunc ( GL_ALWAYS, 0, 1 ) ;
+	}
+
+	/** glEndList(); **/
+	if (freeFrontMatBind) free(frontMatBind);
+	if (freeBackMatBind) free(backMatBind);
+
+	
+	errcode = glGetError();
+	if (errcode!=GL_NO_ERROR)
+	{
+		printf("%s by glDrawSphereSet\n", gluErrorString( errcode ) );
+		return 0;
+	}
+
+	/** return  dpl; **/
+	return 1;
+}
+
+/****************************************************************
+  TRACKBALL Object
+****************************************************************/
+
+/*
+ * Local function for the trackball
+ */
+
+static void track_vcopy(const float *v1, float *v2)
+{
+    register int i;
+    for (i = 0 ; i < 3 ; i++)
+        v2[i] = v1[i];
+}
+
+static void track_vcross(const float *v1, const float *v2, float *cross)
+{
+    float temp[3];
+
+    temp[0] = (v1[1] * v2[2]) - (v1[2] * v2[1]);
+    temp[1] = (v1[2] * v2[0]) - (v1[0] * v2[2]);
+    temp[2] = (v1[0] * v2[1]) - (v1[1] * v2[0]);
+    track_vcopy(temp, cross);
+}
+
+static float track_vlength(const float *v)
+{
+    return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+}
+
+static void track_vscale(float *v, float div)
+{
+    v[0] *= div;
+    v[1] *= div;
+    v[2] *= div;
+}
+
+static void track_vnormal(float *v)
+{
+    track_vscale(v,1.0/track_vlength(v));
+}
+
+/*
+ *  Given an axis and angle, compute quaternion.
+ */
+static void track_axis_to_quat(float a[3], float phi, float q[4])
+{
+  track_vnormal(a);
+  track_vcopy(a,q);
+  track_vscale(q,sin(phi/2.0));
+  q[3] = cos(phi/2.0);
+}
+
+/*
+ * Project an x,y pair onto a sphere of radius r OR a hyperbolic sheet
+ * if we are away from the center of the sphere.
+ */
+static float track_project_to_sphere(float r, float x, float y)
+{
+  float d, t, z;
+
+  d = sqrt(x*x + y*y);
+  if (d < r * 0.70710678118654752440) {    /* Inside sphere */
+    z = sqrt(r*r - d*d);
+  } else {           /* On hyperbola */
+    t = r / 1.41421356237309504880;
+    z = t*t / d;
+  }
+  return z;
+}
+
+/*
+ * Simulate a track-ball.  Project the points onto the virtual
+ * trackball, then figure out the axis of rotation, which is the cross
+ * product of P1 P2 and O P1 (O is the center of the ball, 0,0,0)
+ * Note:  This is a deformed trackball-- is a trackball in the center,
+ * but is deformed into a hyperbolic sheet of rotation away from the
+ * center.  This particular function was chosen after trying out
+ * several variations.
+ *
+ * p1x, p1y: last cursor position  (assumed in range -1.0 ... 1.0)
+ * p2x, p2y: current cursor position  (assumed in range -1.0 ... 1.0)
+ * 
+ * result: q, quaternion describing the rotation
+ */
+static void trackball(float q[4], float p1x, float p1y, float p2x, float p2y,
+		      float size)
+{
+  int i;
+  float a[3]; /* Axis of rotation */
+  float phi;  /* how much to rotate about axis */
+  float p1[3], p2[3], d[3];
+  float t;
+
+  if (p1x == p2x && p1y == p2y) { /* Zero rotation */
+    q[0] = q[1] = q[2] = 0.0; q[3] = 1.0;
+    return;
+  }
+
+  /*
+   * First, figure out z-coordinates for projection of P1 and P2 to
+   * deformed sphere
+   */
+  p1[0] = p1x;
+  p1[1] = p1y;
+  p1[2] = track_project_to_sphere(size,p1x,p1y);
+  p2[0] = p2x;
+  p2[1] = p2y;
+  p2[2] = track_project_to_sphere(size,p2x,p2y);
+
+  /*
+   *  Now, we want the cross product of P1 and P2
+   */
+  track_vcross(p2,p1,a);
+
+  /*
+   *  Figure out how much to rotate around that axis.
+   */
+  for (i=0; i<3; i++) d[i] = p1[i] - p2[i];
+
+  t = track_vlength(d) / (2.0*size);
+
+  /*
+   * Avoid problems with out-of-control values...
+   */
+  if (t > 1.0) t = 1.0;
+  if (t < -1.0) t = -1.0;
+  phi = 2.0 * asin(t);
+
+  track_axis_to_quat(a,phi,q);
+}
+
+/*
+ * Build a rotation matrix, given a quaternion rotation.
+ *
+ */
+static void track_build_rotmatrix(float m[4][4], float q[4])
+{
+  m[0][0] = 1.0 - 2.0 * (q[1] * q[1] + q[2] * q[2]);
+  m[0][1] = 2.0 * (q[0] * q[1] - q[2] * q[3]);
+  m[0][2] = 2.0 * (q[2] * q[0] + q[1] * q[3]);
+  m[0][3] = 0.0;
+
+  m[1][0] = 2.0 * (q[0] * q[1] + q[2] * q[3]);
+  m[1][1]= 1.0 - 2.0 * (q[2] * q[2] + q[0] * q[0]);
+  m[1][2] = 2.0 * (q[1] * q[2] - q[0] * q[3]);
+  m[1][3] = 0.0;
+
+  m[2][0] = 2.0 * (q[2] * q[0] - q[1] * q[3]);
+  m[2][1] = 2.0 * (q[1] * q[2] + q[0] * q[3]);
+  m[2][2] = 1.0 - 2.0 * (q[1] * q[1] + q[0] * q[0]);
+  m[2][3] = 0.0;
+
+  m[3][0] = 0.0;
+  m[3][1] = 0.0;
+  m[3][2] = 0.0;
+  m[3][3] = 1.0;
+}
+
+/*****************************************************************/
+
+#define Py_Try(BOOLEAN) {if(!(BOOLEAN)) return NULL;}
+
+#define PyObjtrackball_Check(op) ((op)->ob_type == &PyObjtrackball_type)
+
+typedef struct {
+  PyObject_HEAD
+    float trackballsize;
+    float scale;
+    float quat[4];
+    float matrix[4][4];
+    int renormcount;
+} PyObjtrackball;
+
+/* staticforward PyTypeObject PyObjtrackball_type; */
+
+
+static PyObject *Pytrackball(PyObject *self, PyObject *args)
+{
+  float p1x, p1y, p2x, p2y;
+  int width, height, mat=0;
+  PyObjtrackball *t = (PyObjtrackball *)self;
+
+  if(!PyArg_ParseTuple(args, "ffffii|i", &p1x, &p1y, &p2x, &p2y,
+		       &width, &height, &mat ))
+    return NULL;
+
+  trackball(t->quat,
+	    (t->scale*p1x - width) / width,  /* assumed to be -1.0 .... 1.0 */
+	    (height - t->scale*p1y) / height,
+	    (t->scale*p2x - width) / width,
+	    (height - t->scale*p2y) / height,
+	    t->trackballsize);
+
+  if (mat) track_build_rotmatrix(t->matrix, t->quat);
+
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+
+
+static struct PyMethodDef PyObjtrackball_methods[] = {
+    {"update", Pytrackball, 1},
+    {NULL, NULL}
+};
+
+
+static void PyObjtrackball_dealloc(PyObjtrackball *self)
+{
+  PyMem_DEL(self);
+}
+
+static int PyObjtrackball_print(PyObjtrackball *self)
+{
+  printf("  size  : %f\n", self->trackballsize);
+  printf("  scale : %f\n", self->scale);
+  printf("  renorm: %i\n", self->renormcount);
+  printf("  quat  : %6.3f %6.3f %6.3f %6.3f\n",
+	 self->quat[0],self->quat[1],self->quat[2],self->quat[3]);
+  printf("  mat   : %6.3f %6.3f %6.3f %6.3f\n",
+	 self->matrix[0][0],self->matrix[0][1],
+	 self->matrix[0][2],self->matrix[0][3]);
+  printf("          %6.3f %6.3f %6.3f %6.3f\n",
+	 self->matrix[1][0],self->matrix[1][1],
+	 self->matrix[1][2],self->matrix[1][3]);
+  printf("          %6.3f %6.3f %6.3f %6.3f\n",
+	 self->matrix[2][0],self->matrix[2][1],
+	 self->matrix[2][2],self->matrix[2][3]);
+  printf("          %6.3f %6.3f %6.3f %6.3f\n",
+	 self->matrix[3][0],self->matrix[3][1],
+	 self->matrix[3][2],self->matrix[3][3]);
+
+  return 0;
+}
+
+/*
+   return an Numeric 1D array of 'len' floats
+*/
+static PyArrayObject *track_array_vector_float(float *data, int len)
+{
+  PyArrayObject *vector;
+
+  vector = (PyArrayObject *)PyArray_FromDims(1, &len, PyArray_FLOAT);
+  if (!vector)
+    {
+      PyErr_SetString(PyExc_RuntimeError,
+		      "Failed to allocate memory for vector");
+      return NULL;
+    }
+  memcpy(vector->data, data, len*sizeof(float));
+  return vector;
+}
+
+
+static PyObject *PyObjtrackball_getattr(PyObjtrackball *self, char *name)
+{
+  if(strcmp(name, "size") == 0)
+    return Py_BuildValue("f", self->trackballsize);
+  if(strcmp(name, "scale") == 0)
+    return Py_BuildValue("f", self->scale);
+  else if (strcmp(name, "quat") == 0)
+      return (PyObject *)(track_array_vector_float(self->quat, 4));
+  else if (strcmp(name, "mat") == 0)
+      return (PyObject *)(track_array_vector_float((float *)(self->matrix), 16));
+  else if (strcmp(name, "renorm") == 0)
+      return Py_BuildValue("i", self->renormcount);
+
+  return Py_FindMethod(PyObjtrackball_methods,
+		       (PyObject *)self, 
+		       name);
+}
+
+static int PyObjtrackball_setattr(PyObjtrackball *self, char *name, PyObject *v)
+{
+  if(strcmp(name, "size") == 0)
+    {
+      Py_Try(PyArg_Parse(v, "f", &self->trackballsize));
+      return 0;
+    }
+  else if (strcmp(name, "scale") == 0)
+    {
+      Py_Try(PyArg_Parse(v, "f", &self->scale));
+      return 0;
+    }
+  else if (strcmp(name, "renom") == 0)
+    {
+      Py_Try(PyArg_Parse(v, "i", &self->renormcount));
+      return 0;
+    }
+
+  PyErr_SetString(PyExc_ValueError, "Sorry, bad or ReadOnly data member");
+  return 1;
+}
+
+static PyObject *PyObjtrackball_repr(PyObjtrackball *self)
+{
+  return Py_BuildValue("s", "Trackball Object");
+}
+
+
+static PyTypeObject PyObjtrackball_type = {
+#ifdef MS_WIN32
+	PyObject_HEAD_INIT(NULL)  
+#else
+    PyObject_HEAD_INIT(&PyType_Type)
+#endif
+    0,                                  /* Object size              */
+    "trackball",
+    sizeof(PyObjtrackball),
+    0,                                  /* Item size                */
+    (destructor)PyObjtrackball_dealloc,
+    (printfunc)PyObjtrackball_print,
+    (getattrfunc)PyObjtrackball_getattr,
+    (setattrfunc)PyObjtrackball_setattr,
+    (cmpfunc)0,                         /* Comparing method         */
+    (reprfunc)PyObjtrackball_repr,
+    0,                                  /* As number                */
+    0,                                  /* As sequence              */
+    0,                                  /* As mapping               */
+    (hashfunc)0,                        /* Hash function            */
+    (ternaryfunc)0,                     /* Ternary function (call)  */
+    (reprfunc)0,                        /* Unknown                  */
+    0L, 0L, 0L, 0L,                     /* Free space               */
+    0L                                  /* Documentation            */
+};
+
+
+
+
+
+static PyObjtrackball *Newtrackball(float size, float scale, int renorm)
+{
+  PyObjtrackball *self;
+  int i,j;
+
+  Py_Try((self = PyObject_NEW(PyObjtrackball, &PyObjtrackball_type)));
+
+/******Initialize your structure values here******/
+  self->trackballsize = size;
+  self->scale = scale;
+  self->renormcount = renorm;
+  for (i=0; i<4; i++) {
+    self->quat[i] = 0.0;
+    for (j=0; j<4; j++) {
+      self->matrix[i][j] = 0.0;
+    }
+    self->matrix[i][i] = 1.0;
+  }
+/*************************************************/
+
+  return self;
+}
+
+
+/*  static PyObject *Create_trackball(PyObject *self, PyObject *args, PyObject *kw) */
+static PyObject *Create_trackball(PyObject *self, PyObject *args)
+{
+  /*static char * argnames[] = { "size", "scale", "renorm", NULL }; */
+  PyObjtrackball *result;
+  int renorm=97;
+  float size=0.8, scale=2.0;
+
+  /*if(!PyArg_ParseTupleAndKeywords(args, kw, "|ffi", argnames,
+    &size, &scale, &renorm))*/
+  if(!PyArg_ParseTuple(args,  "|ffi", &size, &scale, &renorm))
+    return NULL;
+
+  result = Newtrackball(size, scale, renorm);
+
+  if(!result)
+    {
+      PyErr_SetString(PyExc_RuntimeError, "Failed to allocate memory");
+      return NULL;
+    }
+
+  return (PyObject *)result;
+}
+
+
+
+static PyObject* gl_NamedPoints1(PyObject* self, PyObject* args)
+{
+    int i, size, name;
+    PyObject *vop;
+    PyArrayObject *mp;  
+    float *data;
+    if(! (PyArg_ParseTuple(args, "O", &vop))) return NULL;
+
+    mp = (PyArrayObject *)PyArray_ContiguousFromObject(
+						vop, PyArray_FLOAT, 0, 10);
+    if ( !mp ) return NULL;
+
+    size = PyArray_Size((PyObject *)mp);
+    if ((size%3) != 0){
+	PyErr_SetString(PyExc_ValueError, "matrix length sould be divisible by 3");
+	return NULL;
+    }
+    printf("in gl_NamedPoints %d\n", mp->nd);
+    for (data = (float *)mp->data, name=i=0; i<(size/3); i++, name++, data+=3)
+	{
+	  printf("picking %d %p\n", i, data);
+	  printf("picking %f %f %f\n", data[3*i], data[3*i+1], data[3*i+2]);
+	  glPushName(name);
+	  glBegin(GL_POINTS);
+	  /* glVertex3fv(data); */
+	  glEnd();
+	  glPopName();
+	}
+    Py_INCREF(Py_None);
+    return Py_None; 
+}
+
+void namedPoints(int nb, const float *coords)
+{
+  int i, name;
+
+  for (name=i=0; i<nb; i++, name++)
+    {
+      /* printf("picking %f %f %f\n", coords[3*i], coords[(3*i)+1], 
+	 coords[(3*i)+2]); */
+      glPushName(name);
+      glBegin(GL_POINTS);
+      glVertex3fv(&coords[3*i]);
+      glEnd();
+      glPopName();
+    }  
+}
+
+void *map_lookup(char *mp[][2], char *nm) {
+  int i=0;
+  while (mp[i][0] != NULL) {
+    if (strcmp(mp[i][0], nm) == 0) {
+      return (void *)mp[i][1];
+    }
+    i = i+1;
+  }
+  return NULL;
+}
+
+/*
+ * char *glutFonts[][2] = {
+  {"glut9by15", (char *)GLUT_BITMAP_9_BY_15},
+  {"glut8by13", (char *)GLUT_BITMAP_8_BY_13},
+  {"glutTimesRoman10", (char *)GLUT_BITMAP_TIMES_ROMAN_10},
+  {"glutTimesRoman24", (char *)GLUT_BITMAP_TIMES_ROMAN_24},
+#if (GLUT_API_VERSION >= 3)
+  {"glutHelvetica10", (char *)GLUT_BITMAP_HELVETICA_10},
+  {"glutHelvetica12", (char *)GLUT_BITMAP_HELVETICA_12},
+  {"glutHelvetica18", (char *)GLUT_BITMAP_HELVETICA_18},
+  {"glutStrokeRoman", (char *)GLUT_STROKE_ROMAN},
+  {"glutStrokeRomanFixed", (char *)GLUT_STROKE_MONO_ROMAN},
+#endif
+  {NULL, NULL},
+};
+
+void bitmapString(char *fontname, char *string)
+{
+  int len, i;
+  void *font;
+
+  font = map_lookup(glutFonts, fontname);
+  if (font) {
+    len = (int) strlen(string);
+    for (i = 0; i < len; i++) {
+      glutBitmapCharacter(font, string[i]);
+    }
+  }
+}
+*/
+
+
+
+SWIGINTERNINLINE PyObject* 
+SWIG_From_unsigned_SS_long  (unsigned long value)
+{
+  return (value > LONG_MAX) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); 
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN PyObject *_wrap_void_void_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_void_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_void_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_void_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_void_f)void_void_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_void__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_GLenum_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_GLenum_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_GLenum_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_GLenum_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_GLenum_f)void_GLenum_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_unsigned_long__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_int_f)void_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_int_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_int_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_int_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_int_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_int_int_f)void_int_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_int_int_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_int_int_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_int_int_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_int_int_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_int_int_int_f)void_int_int_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_int_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_int_int_int_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_int_int_int_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_int_int_int_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_int_int_int_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_int_int_int_int_f)void_int_int_int_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_int_int_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_unsignedchar_int_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_unsignedchar_int_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_unsignedchar_int_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_unsignedchar_int_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_unsignedchar_int_int_f)void_unsignedchar_int_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_unsigned_char_int_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_unsignedint_int_int_int_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_unsignedint_int_int_int_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_unsignedint_int_int_int_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_unsignedint_int_int_int_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_unsignedint_int_int_int_f)void_unsignedint_int_int_int_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_unsigned_int_int_int_int__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_void_int_voidstar_array_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void_int_voidstar_f result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:void_int_voidstar_array_get",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "void_int_voidstar_array_get" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (void_int_voidstar_f)void_int_voidstar_array_get(arg1);
+  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_p_void__void);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glCleanRotMat(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  double *arg1 ;
+  double (*arg2)[4] ;
+  PyArrayObject *array1 ;
+  int expected_dims1[1] ;
+  PyArrayObject *array2 ;
+  int out_dims2[2] ;
+  PyObject * obj0 = 0 ;
+  char *  kwnames[] = {
+    (char *) "mat_data", NULL 
+  };
+  
+  
+  out_dims2[0] = 4;
+  out_dims2[1] = 4;
+  array2 = (PyArrayObject *)PyArray_FromDims(2, out_dims2, PyArray_DOUBLE);
+  
+  array2->flags |= NPY_OWNDATA;
+  arg2 = (double (*)[4])array2->data;
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:glCleanRotMat",kwnames,&obj0)) SWIG_fail;
+  
+  expected_dims1[0] = 16;
+  if (expected_dims1[0]==1) expected_dims1[0]=0;
+  array1 = contiguous_typed_array(obj0, PyArray_DOUBLE, 1, expected_dims1);
+  if (! array1) return NULL;
+  arg1 = (double *)array1->data;
+  
+  glCleanRotMat(arg1,(double (*)[4])arg2);
+  resultobj = SWIG_Py_Void();
+  
+  resultobj = l_output_helper2(resultobj, (PyObject *)array2);
+  
+  
+  if ( array1 )
+  Py_DECREF((PyObject *)array1);
+  
+  
+  return resultobj;
+fail:
+  
+  if ( array1 )
+  Py_DECREF((PyObject *)array1);
+  
+  
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_extractedGlutSolidSphere(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLint arg2 ;
+  GLint arg3 ;
+  int arg4 = (int) 0 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  long val2 ;
+  int ecode2 = 0 ;
+  long val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  char *  kwnames[] = {
+    (char *) "radius",(char *) "slices",(char *) "stacks",(char *) "insideout", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:extractedGlutSolidSphere",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "extractedGlutSolidSphere" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "extractedGlutSolidSphere" "', argument " "2"" of type '" "GLint""'");
+  } 
+  arg2 = (GLint)(val2);
+  ecode3 = SWIG_AsVal_long(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "extractedGlutSolidSphere" "', argument " "3"" of type '" "GLint""'");
+  } 
+  arg3 = (GLint)(val3);
+  if (obj3) {
+    ecode4 = SWIG_AsVal_int(obj3, &val4);
+    if (!SWIG_IsOK(ecode4)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "extractedGlutSolidSphere" "', argument " "4"" of type '" "int""'");
+    } 
+    arg4 = (int)(val4);
+  }
+  extractedGlutSolidSphere(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_solidCylinder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  GLdouble arg1 ;
+  GLdouble arg2 ;
+  GLdouble arg3 ;
+  GLint arg4 ;
+  GLint arg5 = (GLint) 1 ;
+  int arg6 = (int) 0 ;
+  double val1 ;
+  int ecode1 = 0 ;
+  double val2 ;
+  int ecode2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
+  long val4 ;
+  int ecode4 = 0 ;
+  long val5 ;
+  int ecode5 = 0 ;
+  int val6 ;
+  int ecode6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  char *  kwnames[] = {
+    (char *) "radiusBase",(char *) "radiusTop",(char *) "height",(char *) "slices",(char *) "stacks",(char *) "insideout", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OO:solidCylinder",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_double(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "solidCylinder" "', argument " "1"" of type '" "GLdouble""'");
+  } 
+  arg1 = (GLdouble)(val1);
+  ecode2 = SWIG_AsVal_double(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "solidCylinder" "', argument " "2"" of type '" "GLdouble""'");
+  } 
+  arg2 = (GLdouble)(val2);
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "solidCylinder" "', argument " "3"" of type '" "GLdouble""'");
+  } 
+  arg3 = (GLdouble)(val3);
+  ecode4 = SWIG_AsVal_long(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "solidCylinder" "', argument " "4"" of type '" "GLint""'");
+  } 
+  arg4 = (GLint)(val4);
+  if (obj4) {
+    ecode5 = SWIG_AsVal_long(obj4, &val5);
+    if (!SWIG_IsOK(ecode5)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "solidCylinder" "', argument " "5"" of type '" "GLint""'");
+    } 
+    arg5 = (GLint)(val5);
+  }
+  if (obj5) {
+    ecode6 = SWIG_AsVal_int(obj5, &val6);
+    if (!SWIG_IsOK(ecode6)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "solidCylinder" "', argument " "6"" of type '" "int""'");
+    } 
+    arg6 = (int)(val6);
+  }
+  solidCylinder(arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_namedPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  float *arg2 = (float *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *  kwnames[] = {
+    (char *) "nb",(char *) "coords", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:namedPoints",kwnames,&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "namedPoints" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    int buffer_len;
+    if (PyObject_AsWriteBuffer( obj1, (void**)&arg2, &buffer_len))
+    return NULL;
+    if (! arg2) return PyErr_Format( PyExc_ValueError,
+      "NULL buffer not accepted");
+  }
+  namedPoints(arg1,(float const *)arg2);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawSphereSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  float *arg2 = (float *) 0 ;
+  int arg3 ;
+  float **arg4 = (float **) (float **)NULL ;
+  int *arg5 = (int *) (int *)NULL ;
+  float **arg6 = (float **) (float **)NULL ;
+  int *arg7 = (int *) (int *)NULL ;
+  int *arg8 = (int *) (int *)NULL ;
+  int *arg9 = (int *) (int *)NULL ;
+  int arg10 = (int) 0 ;
+  int arg11 = (int) 1 ;
+  int arg12 = (int) -1 ;
+  int arg13 = (int) 10 ;
+  int arg14 = (int) 10 ;
+  int *arg15 = (int *) NULL ;
+  int arg16 = (int) 0 ;
+  GLuint result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *c_array2 ;
+  int expected_coord_dims2[2] ;
+  PyArrayObject *m_array4[5] ;
+  int expected_prop_dims4[2] ;
+  int intdims4[5] ;
+  float *lala4[5] ;
+  PyArrayObject *m_array6[5] ;
+  int expected_prop_dims6[2] ;
+  int intdims6[5] ;
+  float *lala6[5] ;
+  PyArrayObject *mb_array8 = NULL ;
+  int expected_bind_dims8 ;
+  PyArrayObject *mb_array9 = NULL ;
+  int expected_bind_dims9 ;
+  int val10 ;
+  int ecode10 = 0 ;
+  int val11 ;
+  int ecode11 = 0 ;
+  int val12 ;
+  int ecode12 = 0 ;
+  int val13 ;
+  int ecode13 = 0 ;
+  int val14 ;
+  int ecode14 = 0 ;
+  PyArrayObject *c_array15 = NULL ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  PyObject * obj11 = 0 ;
+  char *  kwnames[] = {
+    (char *) "oneSphDSPL",(char *) "coordinates",(char *) "frontMaterial",(char *) "backMaterial",(char *) "frontMatBind",(char *) "backMatBind",(char *) "frontAndBack",(char *) "noLightCol",(char *) "fillMode",(char *) "slices",(char *) "stacks",(char *) "highlight", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOOOOO:glDrawSphereSet",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawSphereSet" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  
+  expected_coord_dims2[0] = -1;
+  expected_coord_dims2[1] = 4;
+  c_array2 = contiguous_typed_array(obj1, PyArray_FLOAT, 2, 
+    expected_coord_dims2);
+  if (!c_array2) return NULL;
+  arg2 = (float *)c_array2->data;
+  arg3 = c_array2->dimensions[0];
+  
+  if (obj2) {
+    expected_prop_dims4[0] = -1;
+    expected_prop_dims4[1] = 4;
+    if (obj2  == Py_None) 
+    {
+      arg4 = NULL;
+      arg5 = NULL;
+    }
+    else
+    {
+      int nd, i, j;
+      PyObject * lstitem;
+      for (i=0; i<5; i++)
+      {
+        nd = (i==4) ? 1:2;
+        lstitem = PyList_GetItem(obj2, i);
+        m_array4[i] = contiguous_typed_array(lstitem, PyArray_FLOAT, nd,
+          expected_prop_dims4);
+        if (!m_array4[i]) 
+        {
+          for (j=0; j<i; j++)
+          {
+            if (m_array4[j]) 
+            {
+              Py_DECREF((PyObject *)m_array4[j]);
+            }
+          }
+          return NULL;
+        }
+        
+        lala4[i] = (float *)m_array4[i]->data;
+        intdims4[i] = m_array4[i] -> dimensions[0]; 
+      }
+      arg4 = lala4;
+      arg5 = intdims4;
+    } 
+    
+  }
+  if (obj3) {
+    expected_prop_dims6[0] = -1;
+    expected_prop_dims6[1] = 4;
+    if (obj3  == Py_None) 
+    {
+      arg6 = NULL;
+      arg7 = NULL;
+    }
+    else
+    {
+      int nd, i, j;
+      PyObject * lstitem;
+      for (i=0; i<5; i++)
+      {
+        nd = (i==4) ? 1:2;
+        lstitem = PyList_GetItem(obj3, i);
+        m_array6[i] = contiguous_typed_array(lstitem, PyArray_FLOAT, nd,
+          expected_prop_dims6);
+        if (!m_array6[i]) 
+        {
+          for (j=0; j<i; j++)
+          {
+            if (m_array6[j]) 
+            {
+              Py_DECREF((PyObject *)m_array6[j]);
+            }
+          }
+          return NULL;
+        }
+        
+        lala6[i] = (float *)m_array6[i]->data;
+        intdims6[i] = m_array6[i] -> dimensions[0]; 
+      }
+      arg6 = lala6;
+      arg7 = intdims6;
+    } 
+    
+  }
+  if (obj4) {
+    expected_bind_dims8 = 5;
+    if (obj4 == Py_None){
+      mb_array8 = NULL;
+      arg8 = NULL;
+    }
+    else
+    {
+      mb_array8 = contiguous_typed_array(obj4, PyArray_INT, 1,
+        &expected_bind_dims8); 
+      if (!mb_array8)
+      {
+        /* Py_DECREF((PyObject *)c_array); */
+        return NULL;
+      }
+      arg8 = (int *)mb_array8->data;
+    }
+    
+  }
+  if (obj5) {
+    expected_bind_dims9 = 5;
+    if (obj5 == Py_None){
+      mb_array9 = NULL;
+      arg9 = NULL;
+    }
+    else
+    {
+      mb_array9 = contiguous_typed_array(obj5, PyArray_INT, 1,
+        &expected_bind_dims9); 
+      if (!mb_array9)
+      {
+        /* Py_DECREF((PyObject *)c_array); */
+        return NULL;
+      }
+      arg9 = (int *)mb_array9->data;
+    }
+    
+  }
+  if (obj6) {
+    ecode10 = SWIG_AsVal_int(obj6, &val10);
+    if (!SWIG_IsOK(ecode10)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "glDrawSphereSet" "', argument " "10"" of type '" "int""'");
+    } 
+    arg10 = (int)(val10);
+  }
+  if (obj7) {
+    ecode11 = SWIG_AsVal_int(obj7, &val11);
+    if (!SWIG_IsOK(ecode11)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "glDrawSphereSet" "', argument " "11"" of type '" "int""'");
+    } 
+    arg11 = (int)(val11);
+  }
+  if (obj8) {
+    ecode12 = SWIG_AsVal_int(obj8, &val12);
+    if (!SWIG_IsOK(ecode12)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "glDrawSphereSet" "', argument " "12"" of type '" "int""'");
+    } 
+    arg12 = (int)(val12);
+  }
+  if (obj9) {
+    ecode13 = SWIG_AsVal_int(obj9, &val13);
+    if (!SWIG_IsOK(ecode13)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "glDrawSphereSet" "', argument " "13"" of type '" "int""'");
+    } 
+    arg13 = (int)(val13);
+  }
+  if (obj10) {
+    ecode14 = SWIG_AsVal_int(obj10, &val14);
+    if (!SWIG_IsOK(ecode14)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "glDrawSphereSet" "', argument " "14"" of type '" "int""'");
+    } 
+    arg14 = (int)(val14);
+  }
+  if (obj11) {
+    if (obj11 != Py_None)
+    {
+      c_array15 = contiguous_typed_array(obj11, PyArray_INT, 1, NULL);
+      if (!c_array15 ) return NULL;
+      arg15 = (int *)c_array15->data;
+      arg16 = c_array15->dimensions[0];
+    }
+    else
+    {
+      c_array15 = NULL;
+      arg15 = 0;
+      arg16 = NULL;
+    }
+    
+  }
+  result = (GLuint)glDrawSphereSet(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
+  resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result));
+  
+  if (c_array2)
+  Py_DECREF(c_array2);
+  
+  
+  if (arg4)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array4[i])
+      Py_DECREF((PyObject *)m_array4[i]);
+    }
+  }
+  
+  
+  if (arg6)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array6[i])
+      Py_DECREF((PyObject *)m_array6[i]);
+    }
+  }
+  
+  
+  if (mb_array8 && arg8)
+  Py_DECREF(mb_array8);
+  
+  
+  if (mb_array9 && arg9)
+  Py_DECREF(mb_array9);
+  
+  
+  if (c_array15)
+  Py_DECREF(c_array15);
+  
+  return resultobj;
+fail:
+  
+  if (c_array2)
+  Py_DECREF(c_array2);
+  
+  
+  if (arg4)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array4[i])
+      Py_DECREF((PyObject *)m_array4[i]);
+    }
+  }
+  
+  
+  if (arg6)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array6[i])
+      Py_DECREF((PyObject *)m_array6[i]);
+    }
+  }
+  
+  
+  if (mb_array8 && arg8)
+  Py_DECREF(mb_array8);
+  
+  
+  if (mb_array9 && arg9)
+  Py_DECREF(mb_array9);
+  
+  
+  if (c_array15)
+  Py_DECREF(c_array15);
+  
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_glDrawIndexedGeom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  float *arg2 = (float *) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 ;
+  float *arg6 = (float *) NULL ;
+  int *arg7 = (int *) (int *)NULL ;
+  float *arg8 = (float *) NULL ;
+  int *arg9 = (int *) (int *)NULL ;
+  float **arg10 = (float **) (float **)NULL ;
+  int *arg11 = (int *) (int *)NULL ;
+  float **arg12 = (float **) (float **)NULL ;
+  int *arg13 = (int *) (int *)NULL ;
+  int *arg14 = (int *) (int *)NULL ;
+  int *arg15 = (int *) (int *)NULL ;
+  int arg16 = (int) 0 ;
+  int arg17 = (int) 1 ;
+  int arg18 = (int) 1 ;
+  int arg19 = (int) 0 ;
+  int *arg20 = (int *) NULL ;
+  int arg21 = (int) 0 ;
+  GLuint result;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyArrayObject *c_array2 ;
+  int expected_coord_dims2[2] ;
+  PyArrayObject *array4 ;
+  int intdims4[2] ;
+  PyArrayObject *array6 = NULL ;
+  int intdims6[2] ;
+  PyArrayObject *array8 = NULL ;
+  int intdims8[2] ;
+  PyArrayObject *m_array10[5] ;
+  int expected_prop_dims10[2] ;
+  int intdims10[5] ;
+  float *lala10[5] ;
+  PyArrayObject *m_array12[5] ;
+  int expected_prop_dims12[2] ;
+  int intdims12[5] ;
+  float *lala12[5] ;
+  PyArrayObject *mb_array14 = NULL ;
+  int expected_bind_dims14 ;
+  PyArrayObject *mb_array15 = NULL ;
+  int expected_bind_dims15 ;
+  int val16 ;
+  int ecode16 = 0 ;
+  int val17 ;
+  int ecode17 = 0 ;
+  int val18 ;
+  int ecode18 = 0 ;
+  int val19 ;
+  int ecode19 = 0 ;
+  PyArrayObject *c_array20 = NULL ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  PyObject * obj9 = 0 ;
+  PyObject * obj10 = 0 ;
+  PyObject * obj11 = 0 ;
+  PyObject * obj12 = 0 ;
+  PyObject * obj13 = 0 ;
+  char *  kwnames[] = {
+    (char *) "type",(char *) "coordinates",(char *) "indices",(char *) "normals",(char *) "texIndices",(char *) "frontMaterial",(char *) "backMaterial",(char *) "frontMatBind",(char *) "backMatBind",(char *) "frontAndBack",(char *) "noLightCol",(char *) "sharpColorBoundaries",(char *) "preventIntelBug",(char *) "highlight", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOOOOOOO:glDrawIndexedGeom",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "glDrawIndexedGeom" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  
+  if(obj1  == Py_None) 
+  {
+    c_array2 = NULL;
+    arg2 = NULL;
+    arg3 = 0;
+  }
+  else
+  {
+    expected_coord_dims2[0] = -1;
+    expected_coord_dims2[1] = 3;
+    c_array2 = contiguous_typed_array(obj1, PyArray_FLOAT, 2, 
+      expected_coord_dims2);
+    if (!c_array2) return NULL;
+    arg2 = (float *)c_array2->data;
+    arg3 = c_array2->dimensions[0];
+  }
+  
+  
+  if(obj2  == Py_None) 
+  {
+    array4 = NULL;
+    arg4 = NULL;
+    arg5 = NULL;
+  }
+  else
+  {
+    array4 = contiguous_typed_array(obj2, PyArray_INT, 2, NULL);
+    if (!array4) return NULL;
+    arg4 = (int *)array4->data;
+    intdims4[0] = array4->dimensions[0];
+    intdims4[1] = array4->dimensions[1];
+    arg5 = intdims4;
+  }
+  
+  if (obj3) {
+    if(obj3  == Py_None) 
+    {
+      array6 = NULL;
+      arg6 = NULL;
+      arg7 = NULL;
+    }
+    else
+    {
+      array6 = contiguous_typed_array(obj3, PyArray_FLOAT, 2, NULL);
+      if (!array6) return NULL;
+      arg6 = (float *)array6->data;
+      intdims6[0] = array6->dimensions[0];
+      intdims6[1] = array6->dimensions[1];
+      arg7 = intdims6;
+    }
+    
+  }
+  if (obj4) {
+    if(obj4  == Py_None) 
+    {
+      array8 = NULL;
+      arg8 = NULL;
+      arg9 = NULL;
+    }
+    else
+    {
+      array8 = contiguous_typed_array(obj4, PyArray_FLOAT, 2, NULL);
+      if (!array8) return NULL;
+      arg8 = (float *)array8->data;
+      intdims8[0] = array8->dimensions[0];
+      intdims8[1] = array8->dimensions[1];
+      arg9 = intdims8;
+    }
+    
+  }
+  if (obj5) {
+    expected_prop_dims10[0] = -1;
+    expected_prop_dims10[1] = 4;
+    if (obj5  == Py_None) 
+    {
+      arg10 = NULL;
+      arg11 = NULL;
+    }
+    else
+    {
+      int nd, i, j;
+      PyObject * lstitem;
+      for (i=0; i<5; i++)
+      {
+        nd = (i==4) ? 1:2;
+        lstitem = PyList_GetItem(obj5, i);
+        m_array10[i] = contiguous_typed_array(lstitem, PyArray_FLOAT, nd,
+          expected_prop_dims10);
+        if (!m_array10[i]) 
+        {
+          for (j=0; j<i; j++)
+          {
+            if (m_array10[j]) 
+            {
+              Py_DECREF((PyObject *)m_array10[j]);
+            }
+          }
+          return NULL;
+        }
+        
+        lala10[i] = (float *)m_array10[i]->data;
+        intdims10[i] = m_array10[i] -> dimensions[0]; 
+      }
+      arg10 = lala10;
+      arg11 = intdims10;
+    } 
+    
+  }
+  if (obj6) {
+    expected_prop_dims12[0] = -1;
+    expected_prop_dims12[1] = 4;
+    if (obj6  == Py_None) 
+    {
+      arg12 = NULL;
+      arg13 = NULL;
+    }
+    else
+    {
+      int nd, i, j;
+      PyObject * lstitem;
+      for (i=0; i<5; i++)
+      {
+        nd = (i==4) ? 1:2;
+        lstitem = PyList_GetItem(obj6, i);
+        m_array12[i] = contiguous_typed_array(lstitem, PyArray_FLOAT, nd,
+          expected_prop_dims12);
+        if (!m_array12[i]) 
+        {
+          for (j=0; j<i; j++)
+          {
+            if (m_array12[j]) 
+            {
+              Py_DECREF((PyObject *)m_array12[j]);
+            }
+          }
+          return NULL;
+        }
+        
+        lala12[i] = (float *)m_array12[i]->data;
+        intdims12[i] = m_array12[i] -> dimensions[0]; 
+      }
+      arg12 = lala12;
+      arg13 = intdims12;
+    } 
+    
+  }
+  if (obj7) {
+    expected_bind_dims14 = 5;
+    if (obj7 == Py_None){
+      mb_array14 = NULL;
+      arg14 = NULL;
+    }
+    else
+    {
+      mb_array14 = contiguous_typed_array(obj7, PyArray_INT, 1,
+        &expected_bind_dims14); 
+      if (!mb_array14)
+      {
+        /* Py_DECREF((PyObject *)c_array); */
+        return NULL;
+      }
+      arg14 = (int *)mb_array14->data;
+    }
+    
+  }
+  if (obj8) {
+    expected_bind_dims15 = 5;
+    if (obj8 == Py_None){
+      mb_array15 = NULL;
+      arg15 = NULL;
+    }
+    else
+    {
+      mb_array15 = contiguous_typed_array(obj8, PyArray_INT, 1,
+        &expected_bind_dims15); 
+      if (!mb_array15)
+      {
+        /* Py_DECREF((PyObject *)c_array); */
+        return NULL;
+      }
+      arg15 = (int *)mb_array15->data;
+    }
+    
+  }
+  if (obj9) {
+    ecode16 = SWIG_AsVal_int(obj9, &val16);
+    if (!SWIG_IsOK(ecode16)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "glDrawIndexedGeom" "', argument " "16"" of type '" "int""'");
+    } 
+    arg16 = (int)(val16);
+  }
+  if (obj10) {
+    ecode17 = SWIG_AsVal_int(obj10, &val17);
+    if (!SWIG_IsOK(ecode17)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "glDrawIndexedGeom" "', argument " "17"" of type '" "int""'");
+    } 
+    arg17 = (int)(val17);
+  }
+  if (obj11) {
+    ecode18 = SWIG_AsVal_int(obj11, &val18);
+    if (!SWIG_IsOK(ecode18)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "glDrawIndexedGeom" "', argument " "18"" of type '" "int""'");
+    } 
+    arg18 = (int)(val18);
+  }
+  if (obj12) {
+    ecode19 = SWIG_AsVal_int(obj12, &val19);
+    if (!SWIG_IsOK(ecode19)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "glDrawIndexedGeom" "', argument " "19"" of type '" "int""'");
+    } 
+    arg19 = (int)(val19);
+  }
+  if (obj13) {
+    if (obj13 != Py_None)
+    {
+      c_array20 = contiguous_typed_array(obj13, PyArray_INT, 1, NULL);
+      if (!c_array20 ) return NULL;
+      arg20 = (int *)c_array20->data;
+      arg21 = c_array20->dimensions[0];
+    }
+    else
+    {
+      c_array20 = NULL;
+      arg20 = NULL;
+      arg21 = 0;
+    }
+    
+  }
+  result = (GLuint)glDrawIndexedGeom(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
+  resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result));
+  
+  if (c_array2)
+  Py_DECREF(c_array2);
+  
+  
+  if (array4)
+  Py_DECREF(array4);
+  
+  
+  if (array6)
+  Py_DECREF(array6);
+  
+  
+  if (array8)
+  Py_DECREF(array8);
+  
+  
+  if (arg10)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array10[i])
+      Py_DECREF((PyObject *)m_array10[i]);
+    }
+  }
+  
+  
+  if (arg12)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array12[i])
+      Py_DECREF((PyObject *)m_array12[i]);
+    }
+  }
+  
+  
+  if (mb_array14 && arg14)
+  Py_DECREF(mb_array14);
+  
+  
+  if (mb_array15 && arg15)
+  Py_DECREF(mb_array15);
+  
+  
+  if (c_array20)
+  Py_DECREF(c_array20);
+  
+  return resultobj;
+fail:
+  
+  if (c_array2)
+  Py_DECREF(c_array2);
+  
+  
+  if (array4)
+  Py_DECREF(array4);
+  
+  
+  if (array6)
+  Py_DECREF(array6);
+  
+  
+  if (array8)
+  Py_DECREF(array8);
+  
+  
+  if (arg10)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array10[i])
+      Py_DECREF((PyObject *)m_array10[i]);
+    }
+  }
+  
+  
+  if (arg12)
+  {
+    int i;
+    for (i = 0; i < 5; i++)
+    {
+      if (m_array12[i])
+      Py_DECREF((PyObject *)m_array12[i]);
+    }
+  }
+  
+  
+  if (mb_array14 && arg14)
+  Py_DECREF(mb_array14);
+  
+  
+  if (mb_array15 && arg15)
+  Py_DECREF(mb_array15);
+  
+  
+  if (c_array20)
+  Py_DECREF(c_array20);
+  
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_triangleNormalsPerFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  double *arg1 = (double *) 0 ;
+  int *arg2 ;
+  int *arg3 = (int *) 0 ;
+  int *arg4 ;
+  float *arg5 = (float *) 0 ;
+  int result;
+  PyArrayObject *inv1 ;
+  int expected_dims1[2] ;
+  int intdims1[2] ;
+  PyArrayObject *intr3 ;
+  int expected_dims3[2] ;
+  int intdims3[2] ;
+  PyArrayObject *out3 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *  kwnames[] = {
+    (char *) "v_data",(char *) "t_data", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:triangleNormalsPerFace",kwnames,&obj0,&obj1)) SWIG_fail;
+  
+  expected_dims1[0] = 0;
+  expected_dims1[1] = 3;
+  inv1 = contiguous_typed_array(obj0, PyArray_DOUBLE, 2, expected_dims1);
+  if (! inv1) return NULL;
+  arg1 = (double *)inv1->data;
+  intdims1[0] = inv1->dimensions[0];
+  intdims1[1] = inv1->dimensions[1];
+  arg2 = intdims1;
+  
+  
+  expected_dims3[0] = 0;
+  expected_dims3[1] = 3;
+  intr3 = contiguous_typed_array(obj1, PyArray_INT, 2, expected_dims3);
+  if (! intr3) return NULL;
+  arg3 = (int *)intr3->data;
+  intdims3[0] = intr3->dimensions[0];
+  intdims3[1] = intr3->dimensions[1];
+  arg4 = intdims3;
+  arg5 = (float *)malloc(intr3->dimensions[0] * 3 * sizeof(float));
+  if (!arg5)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for the normals");
+    return NULL;
+  }
+  
+  result = (int)triangleNormalsPerFace(arg1,arg2,arg3,arg4,arg5);
+  
+  if(!result)
+  resultobj = NULL;
+  else
+  {
+    Py_INCREF(Py_None); 
+    resultobj = Py_None;
+  }
+  
+  
+  if (resultobj == NULL)
+  {
+    free(arg5);
+    PyErr_SetString(PyExc_RuntimeError,"Failed to compute normals\n");
+    return NULL;
+  }
+  out3 = (PyArrayObject *)PyArray_FromDimsAndData(2, arg4,
+    PyArray_FLOAT, (char *)arg5);
+  if (!out3)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for normals");
+    return NULL;
+  }
+  out3->flags |= NPY_OWNDATA;  /* so we'll free this memory when this 
+  			      array will be garbage collected */
+  resultobj = l_output_helper2(resultobj, (PyObject *)out3);
+  
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr3)
+  Py_DECREF(intr3);
+  
+  return resultobj;
+fail:
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr3)
+  Py_DECREF(intr3);
+  
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_triangleNormalsPerVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  double *arg1 = (double *) 0 ;
+  int *arg2 ;
+  float *arg3 = (float *) 0 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 ;
+  int result;
+  PyArrayObject *inv1 ;
+  int expected_dims1[2] ;
+  int intdims1[2] ;
+  PyArrayObject *intr4 ;
+  int expected_dims4[2] ;
+  int intdims4[2] ;
+  PyArrayObject *out1 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *  kwnames[] = {
+    (char *) "v_data",(char *) "t_data", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:triangleNormalsPerVertex",kwnames,&obj0,&obj1)) SWIG_fail;
+  
+  expected_dims1[0] = 0;
+  expected_dims1[1] = 3;
+  inv1 = contiguous_typed_array(obj0, PyArray_DOUBLE, 2, expected_dims1);
+  if (! inv1) return NULL;
+  arg1 = (double *)inv1->data;
+  intdims1[0] = inv1->dimensions[0];
+  intdims1[1] = inv1->dimensions[1];
+  arg2 = intdims1;
+  arg3 = (float *)malloc(inv1->dimensions[0] * 3 * sizeof(float));
+  if (!arg3)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for the vertex normals");
+    return NULL;
+  }
+  
+  
+  expected_dims4[0] = 0;
+  expected_dims4[1] = 3;
+  intr4 = contiguous_typed_array(obj1, PyArray_INT, 2, expected_dims4);
+  if (! intr4) return NULL;
+  arg4 = (int *)intr4->data;
+  intdims4[0] = intr4->dimensions[0];
+  intdims4[1] = intr4->dimensions[1];
+  arg5 = intdims4;
+  
+  result = (int)triangleNormalsPerVertex(arg1,arg2,arg3,arg4,arg5);
+  
+  if(!result)
+  resultobj = NULL;
+  else
+  {
+    Py_INCREF(Py_None); 
+    resultobj = Py_None;
+  }
+  
+  
+  if (resultobj == NULL)
+  {
+    free(arg3);
+    PyErr_SetString(PyExc_RuntimeError,"Failed to compute normals\n");
+    return NULL;
+  }
+  out1 = (PyArrayObject *)PyArray_FromDimsAndData(2, arg2,
+    PyArray_FLOAT, (char *)arg3);
+  if (!out1)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for normals");
+    return NULL;
+  }
+  out1->flags |= NPY_OWNDATA;  /* so we'll free this memory when this 
+  			      array will be garbage collected */
+  resultobj = l_output_helper2(resultobj, (PyObject *)out1);
+  
+  
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr4)
+  Py_DECREF(intr4);
+  
+  return resultobj;
+fail:
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr4)
+  Py_DECREF(intr4);
+  
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_triangleNormalsBoth(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+  PyObject *resultobj = 0;
+  double *arg1 = (double *) 0 ;
+  int *arg2 ;
+  float *arg3 = (float *) 0 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 ;
+  float *arg6 = (float *) 0 ;
+  int result;
+  PyArrayObject *inv1 ;
+  int expected_dims1[2] ;
+  int intdims1[2] ;
+  PyArrayObject *intr4 ;
+  int expected_dims4[2] ;
+  int intdims4[2] ;
+  PyArrayObject *out1 ;
+  PyArrayObject *out4 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *  kwnames[] = {
+    (char *) "v_data",(char *) "t_data", NULL 
+  };
+  
+  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:triangleNormalsBoth",kwnames,&obj0,&obj1)) SWIG_fail;
+  
+  expected_dims1[0] = 0;
+  expected_dims1[1] = 3;
+  inv1 = contiguous_typed_array(obj0, PyArray_DOUBLE, 2, expected_dims1);
+  if (! inv1) return NULL;
+  arg1 = (double *)inv1->data;
+  intdims1[0] = inv1->dimensions[0];
+  intdims1[1] = inv1->dimensions[1];
+  arg2 = intdims1;
+  arg3 = (float *)malloc(inv1->dimensions[0] * 3 * sizeof(float));
+  if (!arg3)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for the vertex normals");
+    return NULL;
+  }
+  
+  
+  expected_dims4[0] = 0;
+  expected_dims4[1] = 3;
+  intr4 = contiguous_typed_array(obj1, PyArray_INT, 2, expected_dims4);
+  if (! intr4) return NULL;
+  arg4 = (int *)intr4->data;
+  intdims4[0] = intr4->dimensions[0];
+  intdims4[1] = intr4->dimensions[1];
+  arg5 = intdims4;
+  arg6 = (float *)malloc(intr4->dimensions[0] * 3 * sizeof(float));
+  if (!arg6)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for the normals");
+    return NULL;
+  }
+  
+  result = (int)triangleNormalsBoth(arg1,arg2,arg3,arg4,arg5,arg6);
+  
+  if(!result)
+  resultobj = NULL;
+  else
+  {
+    Py_INCREF(Py_None); 
+    resultobj = Py_None;
+  }
+  
+  
+  if (resultobj == NULL)
+  {
+    free(arg3);
+    PyErr_SetString(PyExc_RuntimeError,"Failed to compute normals\n");
+    return NULL;
+  }
+  out1 = (PyArrayObject *)PyArray_FromDimsAndData(2, arg2,
+    PyArray_FLOAT, (char *)arg3);
+  if (!out1)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for normals");
+    return NULL;
+  }
+  out1->flags |= NPY_OWNDATA;  /* so we'll free this memory when this 
+  			      array will be garbage collected */
+  resultobj = l_output_helper2(resultobj, (PyObject *)out1);
+  
+  
+  
+  if (resultobj == NULL)
+  {
+    free(arg6);
+    PyErr_SetString(PyExc_RuntimeError,"Failed to compute normals\n");
+    return NULL;
+  }
+  out4 = (PyArrayObject *)PyArray_FromDimsAndData(2, arg5,
+    PyArray_FLOAT, (char *)arg6);
+  if (!out4)
+  {
+    PyErr_SetString(PyExc_RuntimeError,
+      "Failed to allocate memory for normals");
+    return NULL;
+  }
+  out4->flags |= NPY_OWNDATA;  /* so we'll free this memory when this 
+  			      array will be garbage collected */
+  resultobj = l_output_helper2(resultobj, (PyObject *)out4);
+  
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr4)
+  Py_DECREF(intr4);
+  
+  return resultobj;
+fail:
+  
+  if (inv1)
+  Py_DECREF(inv1);
+  
+  
+  if (intr4)
+  Py_DECREF(intr4);
+  
+  return NULL;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"void_void_array_get", _wrap_void_void_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_GLenum_array_get", _wrap_void_GLenum_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_int_array_get", _wrap_void_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_int_int_array_get", _wrap_void_int_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_int_int_int_array_get", _wrap_void_int_int_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_int_int_int_int_array_get", _wrap_void_int_int_int_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_unsignedchar_int_int_array_get", _wrap_void_unsignedchar_int_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_unsignedint_int_int_int_array_get", _wrap_void_unsignedint_int_int_int_array_get, METH_VARARGS, NULL},
+	 { (char *)"void_int_voidstar_array_get", _wrap_void_int_voidstar_array_get, METH_VARARGS, NULL},
+	 { (char *)"attachCurrentThread", attachCurrentThread, METH_VARARGS, NULL},
+	 { (char *)"detachCurrentThread", detachCurrentThread, METH_VARARGS, NULL},
+	 { (char *)"attachedThread", attachedThread, METH_VARARGS, NULL},
+	 { (char *)"glCleanRotMat", (PyCFunction) _wrap_glCleanRotMat, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"extractedGlutSolidSphere", (PyCFunction) _wrap_extractedGlutSolidSphere, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"solidCylinder", (PyCFunction) _wrap_solidCylinder, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"namedPoints", (PyCFunction) _wrap_namedPoints, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"glDrawSphereSet", (PyCFunction) _wrap_glDrawSphereSet, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"glDrawIndexedGeom", (PyCFunction) _wrap_glDrawIndexedGeom, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"triangleNormalsPerFace", (PyCFunction) _wrap_triangleNormalsPerFace, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"triangleNormalsPerVertex", (PyCFunction) _wrap_triangleNormalsPerVertex, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"triangleNormalsBoth", (PyCFunction) _wrap_triangleNormalsBoth, METH_VARARGS | METH_KEYWORDS, NULL},
+	 { (char *)"glTrackball", Create_trackball, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_a_4__double = {"_p_a_4__double", "double (*)[4]", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_double = {"_p_double", "double *|GLclampd *|GLdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_int__void = {"_p_f_int__void", "void (*)(int)|void_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_int_int__void = {"_p_f_int_int__void", "void (*)(int,int)|void_int_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_int_int_int__void = {"_p_f_int_int_int__void", "void (*)(int,int,int)|void_int_int_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_int_int_int_int__void = {"_p_f_int_int_int_int__void", "void (*)(int,int,int,int)|void_int_int_int_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_int_p_void__void = {"_p_f_int_p_void__void", "void_int_voidstar_f|void (*)(int,void *)", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_unsigned_char_int_int__void = {"_p_f_unsigned_char_int_int__void", "void (*)(unsigned char,int,int)|void_unsignedchar_int_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_unsigned_int_int_int_int__void = {"_p_f_unsigned_int_int_int_int__void", "void (*)(unsigned int,int,int,int)|void_unsignedint_int_int_int_f", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_unsigned_long__void = {"_p_f_unsigned_long__void", "void_GLenum_f|void (*)(unsigned long)", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_f_void__void = {"_p_f_void__void", "void_void_f|void (*)(void)", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_float = {"_p_float", "GLclampf *|float *|GLfloat *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "GLsizei *|long *|GLint *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_float = {"_p_p_float", "float **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_short = {"_p_short", "short *|GLshort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|GLbyte *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|GLubyte *|GLboolean *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "GLuint *|unsigned long *|GLenum *|GLbitfield *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|GLushort *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_void = {"_p_void", "void *|GLvoid *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_a_4__double,
+  &_swigt__p_char,
+  &_swigt__p_double,
+  &_swigt__p_f_int__void,
+  &_swigt__p_f_int_int__void,
+  &_swigt__p_f_int_int_int__void,
+  &_swigt__p_f_int_int_int_int__void,
+  &_swigt__p_f_int_p_void__void,
+  &_swigt__p_f_unsigned_char_int_int__void,
+  &_swigt__p_f_unsigned_int_int_int_int__void,
+  &_swigt__p_f_unsigned_long__void,
+  &_swigt__p_f_void__void,
+  &_swigt__p_float,
+  &_swigt__p_int,
+  &_swigt__p_long,
+  &_swigt__p_p_float,
+  &_swigt__p_short,
+  &_swigt__p_signed_char,
+  &_swigt__p_unsigned_char,
+  &_swigt__p_unsigned_long,
+  &_swigt__p_unsigned_short,
+  &_swigt__p_void,
+};
+
+static swig_cast_info _swigc__p_a_4__double[] = {  {&_swigt__p_a_4__double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_int__void[] = {  {&_swigt__p_f_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_int_int__void[] = {  {&_swigt__p_f_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_int_int_int__void[] = {  {&_swigt__p_f_int_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_int_int_int_int__void[] = {  {&_swigt__p_f_int_int_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_int_p_void__void[] = {  {&_swigt__p_f_int_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_unsigned_char_int_int__void[] = {  {&_swigt__p_f_unsigned_char_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_unsigned_int_int_int_int__void[] = {  {&_swigt__p_f_unsigned_int_int_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_unsigned_long__void[] = {  {&_swigt__p_f_unsigned_long__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_f_void__void[] = {  {&_swigt__p_f_void__void, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_float[] = {  {&_swigt__p_p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_a_4__double,
+  _swigc__p_char,
+  _swigc__p_double,
+  _swigc__p_f_int__void,
+  _swigc__p_f_int_int__void,
+  _swigc__p_f_int_int_int__void,
+  _swigc__p_f_int_int_int_int__void,
+  _swigc__p_f_int_p_void__void,
+  _swigc__p_f_unsigned_char_int_int__void,
+  _swigc__p_f_unsigned_int_int_int_int__void,
+  _swigc__p_f_unsigned_long__void,
+  _swigc__p_f_void__void,
+  _swigc__p_float,
+  _swigc__p_int,
+  _swigc__p_long,
+  _swigc__p_p_float,
+  _swigc__p_short,
+  _swigc__p_signed_char,
+  _swigc__p_unsigned_char,
+  _swigc__p_unsigned_long,
+  _swigc__p_unsigned_short,
+  _swigc__p_void,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{ SWIG_PY_POINTER, (char*)"void_void_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_void__void },
+{ SWIG_PY_POINTER, (char*)"void_GLenum_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_unsigned_long__void },
+{ SWIG_PY_POINTER, (char*)"void_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_int__void },
+{ SWIG_PY_POINTER, (char*)"void_int_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_int_int__void },
+{ SWIG_PY_POINTER, (char*)"void_int_int_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_int_int_int__void },
+{ SWIG_PY_POINTER, (char*)"void_int_int_int_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_int_int_int_int__void },
+{ SWIG_PY_POINTER, (char*)"void_unsignedchar_int_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_unsigned_char_int_int__void },
+{ SWIG_PY_POINTER, (char*)"void_unsignedint_int_int_int_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_unsigned_int_int_int_int__void },
+{ SWIG_PY_POINTER, (char*)"void_int_voidstar_NULL", 0, 0, (void *)(NULL), &SWIGTYPE_p_f_int_p_void__void },
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+    return PyString_FromString("<Swig global variables>");
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar  *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", PyString_AsString(str));
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;  
+    if (!type_init) {
+      const PyTypeObject tmp
+      = {
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* Number of items in variable part (ob_size) */
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc)swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      varlink_type.ob_type = &PyType_Type;
+      type_init = 1;
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          size_t shift = (ci->ptype) - types;
+          swig_type_info *ty = types_initial[shift];
+          size_t ldoc = (c - methods[i].ml_doc);
+          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+          char *ndoc = (char*)malloc(ldoc + lptr + 10);
+          if (ndoc) {
+            char *buff = ndoc;
+            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+            if (ptr) {
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+SWIGEXPORT void SWIG_init(void) {
+  PyObject *m, *d;
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+  d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  
+  SWIG_Python_SetConstant(d, "void_void_dim",SWIG_From_int((int)(void_void_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_GLenum_dim",SWIG_From_int((int)(void_GLenum_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_int_dim",SWIG_From_int((int)(void_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_int_int_dim",SWIG_From_int((int)(void_int_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_int_int_int_dim",SWIG_From_int((int)(void_int_int_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_int_int_int_int_dim",SWIG_From_int((int)(void_int_int_int_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_unsignedchar_int_int_dim",SWIG_From_int((int)(void_unsignedchar_int_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_unsignedint_int_int_int_dim",SWIG_From_int((int)(void_unsignedint_int_int_int_DIM)));
+  
+  SWIG_Python_SetConstant(d, "void_int_voidstar_dim",SWIG_From_int((int)(void_int_voidstar_DIM)));
+  
+  SWIG_Python_SetConstant(d, "sizeof_GLbitfield",SWIG_From_int((int)(sizeof(GLbitfield))));
+  SWIG_Python_SetConstant(d, "sizeof_GLboolean",SWIG_From_int((int)(sizeof(GLboolean))));
+  SWIG_Python_SetConstant(d, "sizeof_GLbyte",SWIG_From_int((int)(sizeof(GLbyte))));
+  SWIG_Python_SetConstant(d, "sizeof_GLclampd",SWIG_From_int((int)(sizeof(GLclampd))));
+  SWIG_Python_SetConstant(d, "sizeof_GLclampf",SWIG_From_int((int)(sizeof(GLclampf))));
+  SWIG_Python_SetConstant(d, "sizeof_GLdouble",SWIG_From_int((int)(sizeof(GLdouble))));
+  SWIG_Python_SetConstant(d, "sizeof_GLenum",SWIG_From_int((int)(sizeof(GLenum))));
+  SWIG_Python_SetConstant(d, "sizeof_GLfloat",SWIG_From_int((int)(sizeof(GLfloat))));
+  SWIG_Python_SetConstant(d, "sizeof_GLint",SWIG_From_int((int)(sizeof(GLint))));
+  SWIG_Python_SetConstant(d, "sizeof_GLshort",SWIG_From_int((int)(sizeof(GLshort))));
+  SWIG_Python_SetConstant(d, "sizeof_GLsizei",SWIG_From_int((int)(sizeof(GLsizei))));
+  SWIG_Python_SetConstant(d, "sizeof_GLubyte",SWIG_From_int((int)(sizeof(GLubyte))));
+  SWIG_Python_SetConstant(d, "sizeof_GLuint",SWIG_From_int((int)(sizeof(GLuint))));
+  SWIG_Python_SetConstant(d, "sizeof_GLushort",SWIG_From_int((int)(sizeof(GLushort))));
+  
+  if (PypObject_SetAttrCobject( m, "opengltk_export",
+      &utilexport, NULL)) return;
+  
+  
+  
+  
+  import_array(); /* load the Numeric PyCObjects */
+  
+  PyDict_SetItemString(d, "_numeric", PyInt_FromLong(1L));
+  
+}
+




More information about the debian-med-commit mailing list