/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3u-20000712-1502 (Alpha 3)
 * 
 * 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
/***********************************************************************
 * common.swg
 *
 *     This file contains generic SWIG runtime support for pointer
 *     type checking as well as a few commonly used macros to control
 *     external linkage.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 *
 * Copyright (c) 1999-2000, The University of Chicago
 * 
 * This file may be freely redistributed without license or fee provided
 * this copyright message remains intact.
 ************************************************************************/

#include <string.h>

#if defined(_WIN32) || defined(__WIN32__)
#       if defined(_MSC_VER)
#               if defined(STATIC_LINKED)
#                       define SWIGEXPORT(a) a
#               else
#                       define SWIGEXPORT(a) __declspec(dllexport) a
#               endif
#       else
#               if defined(__BORLANDC__)
#                       define SWIGEXPORT(a) a _export
#               else
#                       define SWIGEXPORT(a) a
#       endif
#endif
#else
#       define SWIGEXPORT(a) a
#endif

#ifdef SWIG_GLOBAL
#define SWIGRUNTIME(a) SWIGEXPORT(a)
#else
#define SWIGRUNTIME(a) static a
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef struct swig_type_info {
  char  *name;                 
  void *(*converter)(void *);
  char  *str;
  struct swig_type_info  *next;
  struct swig_type_info  *prev;
} swig_type_info;

#ifdef SWIG_NOINCLUDE
SWIGEXPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
SWIGEXPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
SWIGEXPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
#else

static swig_type_info *swig_type_list = 0;

/* Register a type mapping with the type-checking */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeRegister(swig_type_info *ti)
{
  swig_type_info *tc, *head, *ret, *next;
  /* Check to see if this type has already been registered */
  tc = swig_type_list;
  while (tc) {
    if (strcmp(tc->name, ti->name) == 0) {
      /* Already exists in the table.  Just add additional types to the list */
      head = tc;
      next = tc->next;
      goto l1;
    }
    tc = tc->prev;
  }
  head = ti;
  next = 0;

  /* Place in list */
  ti->prev = swig_type_list;
  swig_type_list = ti;

  /* Build linked lists */
 l1:
  ret = head;
  tc = ti + 1;
  /* Patch up the rest of the links */
  while (tc->name) {
    head->next = tc;
    tc->prev = head;
    head = tc;
    tc++;
  }
  head->next = next;
  return ret;
}

/* Check the typename */
SWIGRUNTIME(swig_type_info *) 
SWIG_TypeCheck(char *c, swig_type_info *ty)
{
  swig_type_info *s;
  if (!ty) return 0;        /* Void pointer */
  s = ty->next;             /* First element always just a name */
  while (s) {
    if (strcmp(s->name,c) == 0) {
      if (s == ty->next) return s;
      /* Move s to the top of the linked list */
      s->prev->next = s->next;
      if (s->next) {
	s->next->prev = s->prev;
      }
      /* Insert s as second element in the list */
      s->next = ty->next;
      if (ty->next) ty->next->prev = s;
      ty->next = s;
      return s;
    }
    s = s->next;
  }
  return 0;
}

/* Cast a pointer (needed for C++ inheritance */
SWIGRUNTIME(void *) 
SWIG_TypeCast(swig_type_info *ty, void *ptr) 
{
  if ((!ty) || (!ty->converter)) return ptr;
  return (*ty->converter)(ptr);
}

/* Search for a swig_type_info structure */
SWIGRUNTIME(void *)
SWIG_TypeQuery(const char *name) {
  swig_type_info *ty = swig_type_list;
  while (ty) {
    if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
    ty = ty->prev;
  }
  return 0;
}

#endif

#ifdef __cplusplus
}
#endif



/***********************************************************************
 * python.swg
 *
 *     This file contains the runtime support for Python modules
 *     and includes code for managing global variables and pointer
 *     type checking.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 ************************************************************************/

#include <stdlib.h>
#include "Python.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_PY_INT     1
#define SWIG_PY_FLOAT   2
#define SWIG_PY_STRING  3
#define SWIG_PY_POINTER 4

/* 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 SWIG_NOINCLUDE

SWIGEXPORT(PyObject *)        SWIG_newvarlink();
SWIGEXPORT(void)              SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
SWIGEXPORT(int)               SWIG_ConvertPtr(PyObject *, void **, swig_type_info *, int);
SWIGEXPORT(void)              SWIG_MakePtr(char *c, void *, swig_type_info *);
SWIGEXPORT(PyObject *)        SWIG_NewPointerObj(void *, swig_type_info *);
SWIGEXPORT(void)              SWIG_InstallConstants(PyObject *d, swig_const_info constants[]);

#else

/* -----------------------------------------------------------------------------
 * 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;

static PyObject *
swig_varlink_repr(swig_varlinkobject *v) {
  v = v;
  return PyString_FromString("<Global variables>");
}

static int
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
  swig_globalvar  *var;
  flags = flags;
  fprintf(fp,"Global variables { ");
  for (var = v->vars; var; var=var->next) {
    fprintf(fp,"%s", var->name);
    if (var->next) fprintf(fp,", ");
  }
  fprintf(fp," }\n");
  return 0;
}

static PyObject *
swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      return (*var->get_attr)();
    }
    var = var->next;
  }
  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  return NULL;
}

static int
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      return (*var->set_attr)(p);
    }
    var = var->next;
  }
  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  return 1;
}

statichere PyTypeObject varlinktype = {
  PyObject_HEAD_INIT(0)              
  0,
  "swigvarlink",                      /* Type name    */
  sizeof(swig_varlinkobject),         /* Basic size   */
  0,                                  /* Itemsize     */
  0,                                  /* Deallocator  */ 
  (printfunc) swig_varlink_print,     /* Print        */
  (getattrfunc) swig_varlink_getattr, /* get attr     */
  (setattrfunc) swig_varlink_setattr, /* Set attr     */
  0,                                  /* tp_compare   */
  (reprfunc) swig_varlink_repr,       /* tp_repr      */    
  0,                                  /* tp_as_number */
  0,                                  /* tp_as_mapping*/
  0,                                  /* tp_hash      */
};

/* Create a variable linking object for use later */
SWIGRUNTIME(PyObject *)
SWIG_newvarlink(void) {
  swig_varlinkobject *result = 0;
  result = PyMem_NEW(swig_varlinkobject,1);
  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
  result->ob_type = &varlinktype;
  result->vars = 0;
  result->ob_refcnt = 0;
  Py_XINCREF((PyObject *) result);
  return ((PyObject*) result);
}

SWIGRUNTIME(void)
SWIG_addvarlink(PyObject *p, char *name,
	   PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  swig_varlinkobject *v;
  swig_globalvar *gv;
  v= (swig_varlinkobject *) p;
  gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  gv->name = (char *) malloc(strlen(name)+1);
  strcpy(gv->name,name);
  gv->get_attr = get_attr;
  gv->set_attr = set_attr;
  gv->next = v->vars;
  v->vars = gv;
}
/* Convert a pointer value */
SWIGRUNTIME(int)
SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
  unsigned long p;
  register int d;
  swig_type_info *tc;
  char  *c;
  static PyObject *SWIG_this = 0;
  int    newref = 0;

  if (!obj || (obj == Py_None)) {
    *ptr = 0;
    return 0;
  }
#ifdef SWIG_COBJECT_TYPES
  if (!(PyCObject_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_InternFromString("this");
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PyCObject_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  } 
  *ptr = PyCObject_AsVoidPtr(obj);
  c = (char *) PyCObject_GetDesc(obj);
  if (newref) Py_DECREF(obj);
  goto cobject;
#else
  if (!(PyString_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_InternFromString("this");
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PyString_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  } 
  c = PyString_AsString(obj);
  p = 0;
  /* Pointer values must start with leading underscore */
  if (*c != '_') {
    *ptr = (void *) 0;
    if (strcmp(c,"NULL") == 0) {
      if (newref) Py_DECREF(obj);
      return 0;
    } else {
      if (newref) Py_DECREF(obj);
      goto type_error;
    }
  }
  c++;
  /* Extract hex value from pointer */
  while ((d = *c)) {
    if ((d >= '0') && (d <= '9'))
      p = (p << 4) + (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      p = (p << 4) + (d - ('a'-10));
    else
      break; 
    c++;
  }
  *ptr = (void *) p;
  if (newref) Py_DECREF(obj);
#endif

#ifdef SWIG_COBJECT_TYPES
cobject:
#endif

  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
    *ptr = SWIG_TypeCast(tc,(void*)p);
  }
  return 0;

type_error:

  if (flags) {
    if (ty) {
      char *temp = (char *) malloc(64+strlen(ty->name));
      sprintf(temp,"Type error. Expected %s", ty->name);
      PyErr_SetString(PyExc_TypeError, temp);
      free((char *) temp);
    } else {
      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
    }
  }
  return -1;
}

/* Take a pointer and convert it to a string */
SWIGRUNTIME(void) 
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
  static char hex[17] = "0123456789abcdef";
  unsigned long p, s;
  char result[32], *r; 
  r = result;
  p = (unsigned long) ptr;
  if (p > 0) {
    while (p > 0) {
      s = p & 0xf;
      *(r++) = hex[s];
      p = p >> 4;
    }
    *r = '_';
    while (r >= result)
      *(c++) = *(r--);
    strcpy (c, ty->name);
  } else {
    strcpy (c, "NULL");
  }
}

/* Create a new pointer object */
SWIGRUNTIME(PyObject *)
SWIG_NewPointerObj(void *ptr, swig_type_info *type) {
  char result[512];
  PyObject *robj;
  if (!ptr) {
    Py_INCREF(Py_None);
    return Py_None;
  }
#ifdef SWIG_COBJECT_TYPES
  robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, type->name, NULL);
#else
  SWIG_MakePtr(result,ptr,type);
  robj = PyString_FromString(result);
#endif
  return robj;
}

/* Install Constants */
SWIGRUNTIME(void)
SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
  int i;
  PyObject *obj;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_PY_INT:
      obj = PyInt_FromLong(constants[i].lvalue);
      break;
    case SWIG_PY_FLOAT:
      obj = PyFloat_FromDouble(constants[i].dvalue);
      break;
    case SWIG_PY_STRING:
      obj = PyString_FromString((char *) constants[i].pvalue);
      break;
    case SWIG_PY_POINTER:
      obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype);
      break;
    default:
      obj = 0;
      break;
    }
    if (obj) {
      PyDict_SetItemString(d,constants[i].name,obj);
      Py_DECREF(obj);
    }
  }
}

#endif

#ifdef __cplusplus
}
#endif



/* -------- TYPES TABLE (BEGIN) -------- */

static swig_type_info *swig_types[1];

/* -------- TYPES TABLE (END) -------- */

#define SWIG_init    initGLUT

#define SWIG_name    "GLUT"


int __PyObject_AsArray_Size(PyObject* x);

#ifdef NUMERIC

#define _PyObject_AsArray_Size(x) ((x == Py_None) ? 0 : ((PyArray_Check(x)) ? PyArray_Size(x) : __PyObject_AsArray_Size(x)))

#else /* NUMERIC */

#define _PyObject_AsArray_Size(x) ((x == Py_None) ? 0 : __PyObject_AsArray_Size(x))

#endif /* NUMERIC */


#define _PyObject_As(NAME, BASE) BASE* _PyObject_As##NAME(PyObject* source, PyObject** temp, int* len);

#define _PyObject_AsArray_Cleanup(target, temp) if (temp) Py_XDECREF(temp); else PyMem_Del(target)

_PyObject_As(FloatArray, float)

_PyObject_As(DoubleArray, double)

_PyObject_As(CharArray, signed char)

_PyObject_As(UnsignedCharArray, unsigned char)

_PyObject_As(ShortArray, short)

_PyObject_As(UnsignedShortArray, unsigned short)

_PyObject_As(IntArray, int)

_PyObject_As(UnsignedIntArray, unsigned int)

void* _PyObject_AsArray(GLenum type, PyObject* source, PyObject** temp, int* len);



#define PyErr_XPrint() if (PyErr_Occurred()) PyErr_Print()


#if HAS_DYNAMIC_EXT

#define DECLARE_EXT(PROC_NAME, RET, ERROR_RET, PROTO, CALL)\
RET PROC_NAME PROTO\
{\
	typedef RET (APIENTRY *proc_##PROC_NAME) PROTO;\
	proc_##PROC_NAME proc = (proc_##PROC_NAME)GL_GetProcAddress(#PROC_NAME);\
	if (proc) return proc CALL;\
	PyErr_SetGLerror(GL_INVALID_OPERATION);\
	return ERROR_RET;\
}

#define DECLARE_VOID_EXT(PROC_NAME, PROTO, CALL)\
void PROC_NAME PROTO\
{\
	typedef void (APIENTRY *proc_##PROC_NAME) PROTO;\
	proc_##PROC_NAME proc = (proc_##PROC_NAME)GL_GetProcAddress(#PROC_NAME);\
	if (proc) proc CALL;\
	else PyErr_SetGLerror(GL_INVALID_OPERATION);\
}

#else

#define DECLARE_EXT(PROC_NAME, RET, ERROR_RET, PROTO, CALL)\
RET PROC_NAME PROTO\
{\
	PyErr_SetGLerror(GL_INVALID_OPERATION);\
	return ERROR_RET;\
}

#define DECLARE_VOID_EXT(PROC_NAME, PROTO, CALL)\
void PROC_NAME PROTO\
{\
	PyErr_SetGLerror(GL_INVALID_OPERATION);\
}

#endif


#define _PyTuple_From(NAME, BASE) PyObject* _PyTuple_From##NAME(int len, BASE* data);

_PyTuple_From(UnsignedCharArray, unsigned char)

_PyTuple_From(CharArray, signed char)

_PyTuple_From(UnsignedShortArray, unsigned short)

_PyTuple_From(ShortArray, short)

_PyTuple_From(UnsignedIntArray, unsigned int)

_PyTuple_From(IntArray, int)

_PyTuple_From(FloatArray, float)

_PyTuple_From(DoubleArray, double)


#define _PyObject_From(NAME, BASE) PyObject* _PyObject_From##NAME(int nd, int* dims, BASE* data, int own);

_PyObject_From(UnsignedCharArray, unsigned char)

_PyObject_From(CharArray, signed char)

_PyObject_From(UnsignedShortArray, unsigned short)

_PyObject_From(ShortArray, short)

_PyObject_From(UnsignedIntArray, unsigned int)

_PyObject_From(IntArray, int)

_PyObject_From(FloatArray, float)

_PyObject_From(DoubleArray, double)


PyObject* _PyObject_FromArray(GLenum type, int nd, int *dims, void* data, int own);

void* SetupPixelRead(int rank, GLenum format, GLenum type, int *dims);

void SetupPixelWrite(int rank);

void* SetupRawPixelRead(GLenum format, GLenum type, int n, const int *dims, int* size);

void* _PyObject_AsPointer(PyObject* x);

void init_util();

typedef void *PTR;

typedef struct
{
	void (*_decrement)(void* pointer);
	void (*_decrementPointer)(GLenum pname);
	int (*_incrementLock)(void *pointer);
	int (*_incrementPointerLock)(GLenum pname);
	void (*_acquire)(void* pointer);
	void (*_acquirePointer)(GLenum pname);
#if HAS_DYNAMIC_EXT
	PTR (*GL_GetProcAddress)(const char* name);
#endif
	int (*InitExtension)(const char *name, const char** procs);
	PyObject *_GLerror;
	PyObject *_GLUerror;
}  util_API;


static util_API *_util_API = NULL;

#define decrementLock(x) (*_util_API)._decrement(x)
#define decrementPointerLock(x) (*_util_API)._decrementPointer(x)
#define incrementLock(x) (*_util_API)._incrementLock(x)
#define incrementPointerLock(x) (*_util_API)._incrementPointerLock(x)
#define acquire(x) (*_util_API)._acquire(x)
#define acquirePointer(x) (*_util_API)._acquirePointer(x)
#define GLerror (*_util_API)._GLerror
#define GLUerror (*_util_API)._GLUerror
#if HAS_DYNAMIC_EXT
#define GL_GetProcAddress(x) (*_util_API).GL_GetProcAddress(x)
#endif
#define InitExtension(x, y) (*_util_API).InitExtension(x, (const char**)y)


#define PyErr_SetGLerror(code) PyErr_SetObject(GLerror, Py_BuildValue("is", code, gluErrorString(code)));
#define PyErr_SetGLUerror(code) PyErr_SetObject(GLUerror, Py_BuildValue("is", code, gluErrorString(code)));

int _PyObject_Dimension(PyObject* x, int rank);

#define ERROR_MSG_SEP ", "
#define ERROR_MSG_SEP_LEN 2

int GLErrOccurred()
{
	if (PyErr_Occurred()) return 1;

	if (CurrentContextIsValid())
	{
		GLenum error, *errors = NULL;
		char *msg = NULL;
		const char *this_msg;
		int count = 0;
	
		error = glGetError();

		while (error != GL_NO_ERROR)
		{
			this_msg = gluErrorString(error);
			if (count)
			{
				msg = realloc(msg, (strlen(msg) + strlen(this_msg) + ERROR_MSG_SEP_LEN + 1)*sizeof(char));
				strcat(msg, ERROR_MSG_SEP);
				strcat(msg, this_msg);
				
				errors = realloc(errors, (count + 1)*sizeof(GLenum));
			}
			else
			{
				msg = malloc((strlen(this_msg) + 1)*sizeof(char));
				strcpy(msg, this_msg);
				
				errors = malloc(sizeof(GLenum));
			}
			
			errors[count++] = error;
			error = glGetError();
		}
		
		if (count)
		{
			PyErr_SetObject(GLerror, Py_BuildValue("Os", _PyTuple_FromIntArray(count, (int*)errors), msg));
			free(errors);
			free(msg);
			return 1;
		}
	}

	return 0;
}


/*
#
# GLUT Module for PyOpenGL
#  
# Date: May 2000
# 
# This module is derived from PyGLUT, by Andrew Cox
# 
# Authors: Tarn Weisner Burton <twburton@users.sourceforge.net>
#          Mike C. Fletcher
# 
#
#
# This file is derived from the glut.h distributed with GLUT 3.7. 
# It is a complete wrapper for GLUT API version 4 (provisional) including the 
# game functionality. 
# 
# The conversion to a SWIG interface file was done by me: 
# Andrew Cox (acox@globalnet.co.uk). 
# Any correspondence about PyGlut should be directed to me. 
# 
# Any updates will be made available at my homepage: 
# http://www.users.globalnet.co.uk/~acox/ 
# 
# I place no additional limitations on what can be done with the contents of 
# this file beyond those it inherits from GLUT. 
# 
# DISCLAIMER: 
# PyGlut is provided AS IS without warranty of any kind, either express or 
# implied, including but not limited to the implied warranties of 
# merchantability and fitness for a particular purpose. In no event shall 
# Andrew Cox be liable for any damages whatsoever including direct, indirect, 
# incidental, consequential, loss of business profits or special damages, 
# even if Andrew Cox has been advised of the possibility of such damages.
#
# Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998.
#
# This program is freely distributable without licensing fees  and is
#  provided without guarantee or warrantee expressed or  implied. This
#  program is -not- in the public domain. 
# 
# ToDo:  
# > Rather than refcounting menu callbacks passed in, do something less fragile 
#   in the face of misuse of Glut's Create/Destroy interface. 
# */

PyObject *_glutInit(PyObject* args)
{
	int argc, i;
	char **argv;
	PyObject *o, *s;
	
	if (!PyString_Check(args) && PySequence_Check(args))
	{
		argc = PySequence_Size(args);

		if (argc == 0)
		{
			argv = PyMem_New(char*, argc = 1);
			argv[0] = "foo";
		}
		else
		{
			argv = PyMem_New(char*, argc);
			for (i = 0; i < argc; i++)
			{
				o = PySequence_GetItem(args, i);
				s = PyObject_Str(o);
				
				if (s)
				{
					argv[i] = PyString_AsString(s);
					Py_DECREF(o);
					Py_DECREF(s);
				}
				else
				{
					PyMem_Del(argv);
					Py_DECREF(o);
					PyErr_SetString(PyExc_TypeError, "list must contain strings");
					return NULL;
				}
			}
		}
	}
	else
	{
		PyErr_SetString(PyExc_TypeError, "not a list");
		return NULL;
	}
	
	glutInit(&argc, argv);
	
	o = PyList_New(argc);
	for (i = 0; i < argc; i++) PyList_SetItem(o, i, PyString_FromString(argv[i]));
	PyMem_Del(argv);

	return o;
}
 static char _doc_glutInit[] = "glutInit(argv) -> argv";
 static char _doc_glutInitDisplayMode[] = "glutInitDisplayMode(mode) -> None";
 static char _doc_glutInitWindowPosition[] = "glutInitWindowPosition(x, y) -> None";
 static char _doc_glutInitWindowSize[] = "glutInitWindowSize(width, height) -> None";
 static char _doc_glutMainLoop[] = "glutMainLoop() -> None";

PyObject *windows, *menus;

void setCallback(const char* name, PyObject* func)
{
	PyObject *window_id = PyInt_FromLong(glutGetWindow());
	PyObject *window = PyDict_GetItem(windows, window_id);

	if (!window)
	{
		window = PyDict_New();
		PyDict_SetItem(windows, window_id, window);
	}
	
	Py_DECREF(window_id);
	PyDict_SetItemString(window, (char*)name, func);
}

PyObject *getCallback(const char* name)
{
	PyObject *window_id = PyInt_FromLong(glutGetWindow());
	PyObject *window = PyDict_GetItem(windows, window_id);

	Py_DECREF(window_id);
	if (!window) return NULL;
	return PyDict_GetItemString(window, (char*)name);
}

/*
 * Utilities that build argument lists for Python callbacks and then eval them.
 */

void eval_no_args(PyObject *func)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, NULL);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}

void eval_1int_arg(PyObject *func, int arg1)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, "(i)", arg1);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}

/* Call a PyObject that takes two int arguments.*/
void eval_2int_args(PyObject *func, int arg1, int arg2)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, "ii", arg1, arg2);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}

void eval_3int_args(PyObject *func, int arg1, int arg2, int arg3)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, "iii", arg1, arg2, arg3);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}

void eval_4int_args(PyObject *func, int arg1, int arg2, int arg3, int arg4)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, "iiii", arg1, arg2, arg3, arg4);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}

void eval_1uchar_2int_args(PyObject *func, unsigned char arg1, int arg2, int arg3)
{
	if (func && func != Py_None)
	{
		PyObject *result = PyObject_CallFunction(func, "cii", arg1, arg2, arg3);
		Py_XDECREF(result);
		PyErr_XPrint();
	}
}


#define GLOBAL_CALLBACK(NAME)\
void _glut##NAME##Func(PyObject *pyfunc)\
{\
    PyObject *old = NAME##Func;\
    NAME##Func = pyfunc;\
    Py_XINCREF(pyfunc);\
    glut##NAME##Func((pyfunc == Py_None) ? NULL : NAME##Callback);\
    Py_XDECREF(old);\
}


#define WIN_CALLBACK(NAME)\
void _glut##NAME##Func(PyObject *pyfunc)\
{\
	setCallback(#NAME, pyfunc);\
	glut##NAME##Func((pyfunc == Py_None) ? NULL : NAME##Callback);\
}

void DisplayCallback(void)
{
	eval_no_args(getCallback("Display"));
}

WIN_CALLBACK(Display)
 static char _doc_glutDisplayFunc[] = "glutDisplayFunc(func) -> None";

void ReshapeCallback(int x, int y)
{
	eval_2int_args(getCallback("Reshape"), x, y);
}

WIN_CALLBACK(Reshape)
 static char _doc_glutReshapeFunc[] = "glutReshapeFunc(func) -> None";

void KeyboardCallback(unsigned char key, int x, int y)
{
    eval_1uchar_2int_args(getCallback("Keyboard"), key, x, y);
}

WIN_CALLBACK(Keyboard)
 static char _doc_glutKeyboardFunc[] = "glutKeyboardFunc(func) -> None";

void MouseCallback(int button, int state, int x, int y)
{
    eval_4int_args(getCallback("Mouse"), button, state, x, y);
}

WIN_CALLBACK(Mouse)
 static char _doc_glutMouseFunc[] = "glutMouseFunc(func) -> None";

void MotionCallback(int x, int y)
{
    eval_2int_args(getCallback("Motion"), x, y);
}

WIN_CALLBACK(Motion)
 static char _doc_glutMotionFunc[] = "glutMotionFunc(func) -> None";

void PassiveMotionCallback(int x, int y)
{
    eval_2int_args(getCallback("PassiveMotion"), x, y);
}

WIN_CALLBACK(PassiveMotion)
 static char _doc_glutPassiveMotionFunc[] = "glutPassiveMotionFunc(func) -> None";

void EntryCallback(int state)
{
    eval_1int_arg(getCallback("Entry"), state);
}

WIN_CALLBACK(Entry)
 static char _doc_glutEntryFunc[] = "glutEntryFunc(func) -> None";

void VisibilityCallback(int state)
{
    eval_1int_arg(getCallback("Visibility"), state);
}

WIN_CALLBACK(Visibility)
 static char _doc_glutVisibilityFunc[] = "glutVisibilityFunc(func) -> None";

void SpecialCallback(int key, int x, int y)
{
    eval_3int_args(getCallback("Special"), key, x, y);
}

WIN_CALLBACK(Special)
 static char _doc_glutSpecialFunc[] = "glutSpecialFunc(func) -> None";

void SpaceballMotionCallback(int x, int y, int z)
{
    eval_3int_args(getCallback("SpaceballMotion"), x, y, z);
}

WIN_CALLBACK(SpaceballMotion)
 static char _doc_glutSpaceballMotionFunc[] = "glutSpaceballMotionFunc(func) -> None";

void SpaceballRotateCallback(int x, int y, int z)
{
    eval_3int_args(getCallback("SpaceballRotate"), x, y, z);
}

WIN_CALLBACK(SpaceballRotate)
 static char _doc_glutSpaceballRotateFunc[] = "glutSpaceballRotateFunc(func) -> None";

void SpaceballButtonCallback(int button, int state)
{
    eval_2int_args(getCallback("SpaceballButton"), button, state);
}

WIN_CALLBACK(SpaceballButton)
 static char _doc_glutSpaceballButtonFunc[] = "glutSpaceballButtonFunc(func) -> None";

void ButtonBoxCallback(int button, int state)
{
    eval_2int_args(getCallback("ButtonBox"), button, state);
}

WIN_CALLBACK(ButtonBox)
 static char _doc_glutButtonBoxFunc[] = "glutButtonBoxFunc(func) -> None";

void DialsCallback(int dial, int value)
{
    eval_2int_args(getCallback("Dials"), dial, value);
}

WIN_CALLBACK(Dials)
 static char _doc_glutDialsFunc[] = "glutDialsFunc(func) -> None";

void TabletMotionCallback(int x, int y)
{
    eval_2int_args(getCallback("TabletMotion"), x, y);
}

WIN_CALLBACK(TabletMotion)
 static char _doc_glutTabletMotionFunc[] = "glutTabletMotionFunc(func) -> None";

void TabletButtonCallback(int button, int state, int x, int y)
{
    eval_4int_args(getCallback("TabletButton"), button, state, x, y);
}

WIN_CALLBACK(TabletButton)
 static char _doc_glutTabletButtonFunc[] = "glutTabletButtonFunc(func) -> None";

void OverlayDisplayCallback(void)
{
    eval_no_args(getCallback("OverlayDisplay"));
}

WIN_CALLBACK(OverlayDisplay)
 static char _doc_glutOverlayDisplayFunc[] = "glutOverlayDisplayFunc(func) -> None";

static PyObject *IdleFunc = NULL;

void IdleCallback(void)
{
    eval_no_args(IdleFunc);
}

GLOBAL_CALLBACK(Idle)
 static char _doc_glutIdleFunc[] = "glutIdleFunc(func) -> None";

static PyObject *TimerFunc = NULL;

void TimerCallback(int state)
{
    eval_1int_arg(TimerFunc, state);
}

void _glutTimerFunc(unsigned int millis, PyObject *pyfunc, int value)
{
    PyObject *old = TimerFunc;
    TimerFunc = pyfunc;
    Py_XINCREF(pyfunc);
    glutTimerFunc(millis, (pyfunc == Py_None) ? NULL : TimerCallback, value);
    Py_XDECREF(old);
}
 static char _doc_glutTimerFunc[] = "glutTimerFunc(millis, func, state) -> None";

static PyObject *MenuStateFunc = NULL;

void MenuStateCallback(int state)
{
	eval_1int_arg(MenuStateFunc, state);
}

GLOBAL_CALLBACK(MenuState)
 static char _doc_glutMenuStateFunc[] = "glutMenuStateFunc(func) -> None";

static PyObject *MenuStatusFunc = NULL;

void MenuStatusCallback(int status, int x, int y)
{
    eval_3int_args(MenuStatusFunc, status, x, y);
}

GLOBAL_CALLBACK(MenuStatus)
 static char _doc_glutMenuStatusFunc[] = "glutMenuStatusFunc(func) -> None";

static PyObject *WindowStatusFunc = NULL;

void WindowStatusCallback(int state)
{
    eval_1int_arg(WindowStatusFunc, state);
}

GLOBAL_CALLBACK(WindowStatus)
 static char _doc_glutWindowStatusFunc[] = "glutWindowStatusFunc(func) -> None";
 static char _doc_glutCreateWindow[] = "glutCreateWindow(title) -> win";
 static char _doc_glutCreateSubWindow[] = "glutCreateSubWindow(win, x, y, width, height) -> win";

void _glutDestroyWindow(int win)
{
	PyObject *window_id = PyInt_FromLong(win);

	PyDict_DelItem(windows, window_id);
	PyErr_Clear();
	Py_DECREF(window_id);
	
	glutDestroyWindow(win);
}
 static char _doc_glutDestroyWindow[] = "glutDestroyWindow(win) -> None";
 static char _doc_glutPostRedisplay[] = "glutPostRedisplay() -> None";
 static char _doc_glutSwapBuffers[] = "glutSwapBuffers() -> None";
 static char _doc_glutGetWindow[] = "glutGetWindow() -> None";
 static char _doc_glutSetWindow[] = "glutSetWindow() -> None";
 static char _doc_glutSetWindowTitle[] = "glutSetWindowTitle(title) -> None";
 static char _doc_glutSetIconTitle[] = "glutSetIconTitle(title) -> None";
 static char _doc_glutPositionWindow[] = "glutPositionWindow(x, y) -> None";
 static char _doc_glutReshapeWindow[] = "glutReshapeWindow(width, height) -> None";
 static char _doc_glutPopWindow[] = "glutPopWindow() -> None";
 static char _doc_glutPushWindow[] = "glutPushWindow() -> None";
 static char _doc_glutIconifyWindow[] = "glutIconifyWindow() -> None";
 static char _doc_glutShowWindow[] = "glutShowWindow() -> None";
 static char _doc_glutHideWindow[] = "glutHideWindow() -> None";

void MenuCallback(int event)
{
	PyObject *menu_id = PyInt_FromLong(glutGetMenu());
	PyObject *func = PyDict_GetItem(menus, menu_id);

	Py_DECREF(menu_id);
	eval_1int_arg(func, event);
}

int _glutCreateMenu(PyObject *pyfunc)
{
	int menu = glutCreateMenu(MenuCallback);
	PyObject *menu_id = PyInt_FromLong(menu);

	PyDict_SetItem(menus, menu_id, pyfunc);
	Py_DECREF(menu_id);

	return menu;
}

void _glutDestroyMenu(int menu)
{
	PyObject *menu_id = PyInt_FromLong(glutGetMenu());

	PyDict_DelItem(menus, menu_id);
	Py_DECREF(menu_id);
	glutDestroyMenu(menu);
}
 static char _doc_glutCreateMenu[] = "glutCreateMenu(func) -> menu";
 static char _doc_glutDestroyMenu[] = "glutDestroyMenu(menu) -> None";
 static char _doc_glutGetMenu[] = "glutGetMenu() -> mene";
 static char _doc_glutSetMenu[] = "glutSetMenu(menu) -> None";
 static char _doc_glutAddMenuEntry[] = "glutAddMenuEntry(label, value) -> None";
 static char _doc_glutAddSubMenu[] = "glutAddSubMenu(label, submenu) -> None";
 static char _doc_glutChangeToMenuEntry[] = "glutChangeToMenuEntry(item, label, value) -> None";
 static char _doc_glutChangeToSubMenu[] = "glutChangeToSubMenu(item, label, submenu) -> None";
 static char _doc_glutRemoveMenuItem[] = "glutRemoveMenuItem(item) -> None";
 static char _doc_glutAttachMenu[] = "glutAttachMenu(button) -> None";
 static char _doc_glutDetachMenu[] = "glutDetachMenu(button) -> None";
 static char _doc_glutSetColor[] = "glutSetColor(cell, red, green, blue) -> None";
 static char _doc_glutGetColor[] = "glutGetColor(ndx, component) -> None";
 static char _doc_glutCopyColormap[] = "glutCopyColormap(win) -> None";
 static char _doc_glutGet[] = "glutGet(type) -> None";
 static char _doc_glutDeviceGet[] = "glutDeviceGet() -> None";

/* On MS Windows fonts are ints disguised as void*s. On Unix they realy are 
# void*s. 
# On the Python side fonts are known by int values. */

void* _PyInt_AsFont(PyObject *x)
{
	if (PyInt_Check(x))
	{
		switch (PyInt_AsLong(x))
		{
		case 0:
			return GLUT_STROKE_ROMAN;
		case 1:
			return GLUT_STROKE_MONO_ROMAN;
		case 2:
			return GLUT_BITMAP_9_BY_15;
		case 3:
			return GLUT_BITMAP_8_BY_13;
		case 4:
			return GLUT_BITMAP_TIMES_ROMAN_10;
		case 5:
			return GLUT_BITMAP_TIMES_ROMAN_24;
#if (GLUT_API_VERSION >= 3)
		case 6:
			return GLUT_BITMAP_HELVETICA_10;
		case 7:
			return GLUT_BITMAP_HELVETICA_12;
		case 8:
			return GLUT_BITMAP_HELVETICA_18;
#endif
		}
		
		PyErr_SetString(PyExc_ValueError, "Unknown font.");
	}
	else PyErr_SetString(PyExc_ValueError, "Invalid font identifier.");
	
	return 0;
}
 static char _doc_glutBitmapCharacter[] = "glutBitmapCharacter(font, character) -> None";
 static char _doc_glutBitmapWidth[] = "glutBitmapWidth(font, character) -> None";
 static char _doc_glutStrokeCharacter[] = "glutStrokeCharacter(font, character) -> None";
 static char _doc_glutStrokeWidth[] = "glutStrokeWidth(font, character) -> None";
 static char _doc_glutWireSphere[] = "glutWireSphere(radius, slices, stacks) -> None";
 static char _doc_glutSolidSphere[] = "glutSolidSphere(radius, slices, stacks) -> None";
 static char _doc_glutWireCone[] = "glutWireCone(base, height, slices, stacks) -> None";
 static char _doc_glutSolidCone[] = "glutSolidCone(base, height, slices, stacks) -> None";
 static char _doc_glutWireCube[] = "glutWireCube(size) -> None";
 static char _doc_glutSolidCube[] = "glutSolidCube(size) -> None";
 static char _doc_glutWireTorus[] = "glutWireTorus(innerRadius, outerRadius, size, rings) -> None";
 static char _doc_glutSolidTorus[] = "glutSolidTorus(innerRadius, outerRadius, size, rings) -> None";
 static char _doc_glutWireDodecahedron[] = "glutWireDodecahedron() -> None";
 static char _doc_glutSolidDodecahedron[] = "glutSolidDodecahedron() -> None";
 static char _doc_glutWireTeapot[] = "glutWireTeapot(size) -> None";
 static char _doc_glutSolidTeapot[] = "glutSolidTeapot(size) -> None";
 static char _doc_glutWireOctahedron[] = "glutWireOctahedron() -> None";
 static char _doc_glutSolidOctahedron[] = "glutSolidOctahedron() -> None";
 static char _doc_glutWireTetrahedron[] = "glutWireTetrahedron() -> None";
 static char _doc_glutSolidTetrahedron[] = "glutSolidTetrahedron() -> None";
 static char _doc_glutWireIcosahedron[] = "glutWireIcosahedron() -> None";
 static char _doc_glutSolidIcosahedron[] = "glutSolidIcosahedron() -> None";
 static char _doc_glutExtensionSupported[] = "glutExtensionSupported(name) -> int";
 static char _doc_glutFullScreen[] = "glutFullScreen() -> None";
 static char _doc_glutSetCursor[] = "glutSetCursor(cursor) -> None";
 static char _doc_glutEstablishOverlay[] = "glutEstablishOverlay() -> None";
 static char _doc_glutRemoveOverlay[] = "glutRemoveOverlay(func) -> None";
 static char _doc_glutUseLayer[] = "glutUseLayer(layer) -> None";
 static char _doc_glutPostOverlayRedisplay[] = "glutPostOverlayRedisplay() -> None";
 static char _doc_glutShowOverlay[] = "glutShowOverlay() -> None";
 static char _doc_glutHideOverlay[] = "glutHideOverlay() -> None";
 static char _doc_glutGetModifiers[] = "glutGetModifiers() -> None";
 static char _doc_glutLayerGet[] = "glutLayerGet(type) -> None";
 static char _doc_glutWarpPointer[] = "glutWarpPointer(x, y) -> None";
 static char _doc_glutVideoResizeGet[] = "glutVideoResizeGet(param) -> None";
 static char _doc_glutSetupVideoResizing[] = "glutSetupVideoResizing() -> None";
 static char _doc_glutStopVideoResizing[] = "glutStopVideoResizing() -> None";
 static char _doc_glutVideoResize[] = "glutVideoResize(x, y, width, height) -> None";
 static char _doc_glutVideoPan[] = "glutVideoPan(x, y, width, height) -> None";

PyObject *__info()
{
	return PyList_New(0);
}
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_glutInit(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    PyObject *result ;
    
    if(!PyArg_ParseTuple(args,"O:glutInit",&obj0)) return NULL;
    {
        arg0 = obj0;
    }
    {
        result = (PyObject *)_glutInit(arg0);
        if (PyErr_Occurred()) return NULL; 
    }{
        resultobj = result;
    }
    return resultobj;
}


static PyObject *_wrap_glutInitDisplayMode(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    unsigned int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutInitDisplayMode",&arg0)) return NULL;
    {
        glutInitDisplayMode(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutInitWindowPosition(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"ii:glutInitWindowPosition",&arg0,&arg1)) return NULL;
    {
        glutInitWindowPosition(arg0,arg1);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutInitWindowSize(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"ii:glutInitWindowSize",&arg0,&arg1)) return NULL;
    {
        glutInitWindowSize(arg0,arg1);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutMainLoop(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutMainLoop")) return NULL;
    {
        glutMainLoop();
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutDisplayFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutDisplayFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutDisplayFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutReshapeFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutReshapeFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutReshapeFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutKeyboardFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutKeyboardFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutKeyboardFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutMouseFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutMouseFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutMouseFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutMotionFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutMotionFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutMotionFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPassiveMotionFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutPassiveMotionFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutPassiveMotionFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutEntryFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutEntryFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutEntryFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutVisibilityFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutVisibilityFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutVisibilityFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSpecialFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutSpecialFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutSpecialFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSpaceballMotionFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutSpaceballMotionFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutSpaceballMotionFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSpaceballRotateFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutSpaceballRotateFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutSpaceballRotateFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSpaceballButtonFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutSpaceballButtonFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutSpaceballButtonFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutButtonBoxFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutButtonBoxFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutButtonBoxFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutDialsFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutDialsFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutDialsFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutTabletMotionFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutTabletMotionFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutTabletMotionFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutTabletButtonFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutTabletButtonFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutTabletButtonFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutOverlayDisplayFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutOverlayDisplayFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutOverlayDisplayFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutIdleFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutIdleFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutIdleFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutTimerFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    unsigned int arg0 ;
    PyObject *arg1 ;
    int arg2 ;
    PyObject * obj1  = 0 ;
    
    if(!PyArg_ParseTuple(args,"iOi:glutTimerFunc",&arg0,&obj1,&arg2)) return NULL;
    {
        if (obj1 != Py_None && !PyCallable_Check(obj1))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg1 = obj1;
    }
    {
        _glutTimerFunc(arg0,arg1,arg2);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutMenuStateFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutMenuStateFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutMenuStateFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutMenuStatusFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutMenuStatusFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutMenuStatusFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWindowStatusFunc(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"O:glutWindowStatusFunc",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        _glutWindowStatusFunc(arg0);
        if (PyErr_Occurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutCreateWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"s:glutCreateWindow",&arg0)) return NULL;
    {
        result = (int )glutCreateWindow((char const *)arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutCreateSubWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"iiiii:glutCreateSubWindow",&arg0,&arg1,&arg2,&arg3,&arg4)) return NULL;
    {
        result = (int )glutCreateSubWindow(arg0,arg1,arg2,arg3,arg4);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutDestroyWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutDestroyWindow",&arg0)) return NULL;
    {
        _glutDestroyWindow(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPostRedisplay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutPostRedisplay")) return NULL;
    {
        glutPostRedisplay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSwapBuffers(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSwapBuffers")) return NULL;
    {
        glutSwapBuffers();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutGetWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result ;
    
    if(!PyArg_ParseTuple(args,":glutGetWindow")) return NULL;
    {
        result = (int )glutGetWindow();
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutSetWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutSetWindow",&arg0)) return NULL;
    {
        glutSetWindow(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSetWindowTitle(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    
    if(!PyArg_ParseTuple(args,"s:glutSetWindowTitle",&arg0)) return NULL;
    {
        glutSetWindowTitle((char const *)arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSetIconTitle(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    
    if(!PyArg_ParseTuple(args,"s:glutSetIconTitle",&arg0)) return NULL;
    {
        glutSetIconTitle((char const *)arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPositionWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"ii:glutPositionWindow",&arg0,&arg1)) return NULL;
    {
        glutPositionWindow(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutReshapeWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"ii:glutReshapeWindow",&arg0,&arg1)) return NULL;
    {
        glutReshapeWindow(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPopWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutPopWindow")) return NULL;
    {
        glutPopWindow();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPushWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutPushWindow")) return NULL;
    {
        glutPushWindow();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutIconifyWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutIconifyWindow")) return NULL;
    {
        glutIconifyWindow();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutShowWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutShowWindow")) return NULL;
    {
        glutShowWindow();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutHideWindow(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutHideWindow")) return NULL;
    {
        glutHideWindow();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutCreateMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *arg0 ;
    PyObject * obj0  = 0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"O:glutCreateMenu",&obj0)) return NULL;
    {
        if (obj0 != Py_None && !PyCallable_Check(obj0))
        {
            PyErr_SetString(PyExc_Exception, "Not callable.");
            return NULL;
        }
        arg0 = obj0;
    }
    {
        result = (int )_glutCreateMenu(arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutDestroyMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutDestroyMenu",&arg0)) return NULL;
    {
        _glutDestroyMenu(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutGetMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result ;
    
    if(!PyArg_ParseTuple(args,":glutGetMenu")) return NULL;
    {
        result = (int )glutGetMenu();
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutSetMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutSetMenu",&arg0)) return NULL;
    {
        glutSetMenu(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutAddMenuEntry(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"si:glutAddMenuEntry",&arg0,&arg1)) return NULL;
    {
        glutAddMenuEntry((char const *)arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutAddSubMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"si:glutAddSubMenu",&arg0,&arg1)) return NULL;
    {
        glutAddSubMenu((char const *)arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutChangeToMenuEntry(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    char *arg1 ;
    int arg2 ;
    
    if(!PyArg_ParseTuple(args,"isi:glutChangeToMenuEntry",&arg0,&arg1,&arg2)) return NULL;
    {
        glutChangeToMenuEntry(arg0,(char const *)arg1,arg2);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutChangeToSubMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    char *arg1 ;
    int arg2 ;
    
    if(!PyArg_ParseTuple(args,"isi:glutChangeToSubMenu",&arg0,&arg1,&arg2)) return NULL;
    {
        glutChangeToSubMenu(arg0,(char const *)arg1,arg2);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutRemoveMenuItem(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutRemoveMenuItem",&arg0)) return NULL;
    {
        glutRemoveMenuItem(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutAttachMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutAttachMenu",&arg0)) return NULL;
    {
        glutAttachMenu(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutDetachMenu(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutDetachMenu",&arg0)) return NULL;
    {
        glutDetachMenu(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSetColor(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    GLfloat arg1 ;
    GLfloat arg2 ;
    GLfloat arg3 ;
    
    if(!PyArg_ParseTuple(args,"ifff:glutSetColor",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutSetColor(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutGetColor(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    GLfloat result ;
    
    if(!PyArg_ParseTuple(args,"ii:glutGetColor",&arg0,&arg1)) return NULL;
    {
        result = (GLfloat )glutGetColor(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyFloat_FromDouble(result);
    return resultobj;
}


static PyObject *_wrap_glutCopyColormap(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutCopyColormap",&arg0)) return NULL;
    {
        glutCopyColormap(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutGet(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"i:glutGet",&arg0)) return NULL;
    {
        result = (int )glutGet(arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutDeviceGet(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"i:glutDeviceGet",&arg0)) return NULL;
    {
        result = (int )glutDeviceGet(arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutBitmapCharacter(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    void *arg0 ;
    int arg1 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"Oi:glutBitmapCharacter",&obj0,&arg1)) return NULL;
    {
        arg0 = _PyInt_AsFont(obj0);
        if (PyErr_Occurred()) return NULL;
    }
    {
        glutBitmapCharacter(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutBitmapWidth(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    void *arg0 ;
    int arg1 ;
    PyObject * obj0  = 0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"Oi:glutBitmapWidth",&obj0,&arg1)) return NULL;
    {
        arg0 = _PyInt_AsFont(obj0);
        if (PyErr_Occurred()) return NULL;
    }
    {
        result = (int )glutBitmapWidth(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutStrokeCharacter(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    void *arg0 ;
    int arg1 ;
    PyObject * obj0  = 0 ;
    
    if(!PyArg_ParseTuple(args,"Oi:glutStrokeCharacter",&obj0,&arg1)) return NULL;
    {
        arg0 = _PyInt_AsFont(obj0);
        if (PyErr_Occurred()) return NULL;
    }
    {
        glutStrokeCharacter(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutStrokeWidth(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    void *arg0 ;
    int arg1 ;
    PyObject * obj0  = 0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"Oi:glutStrokeWidth",&obj0,&arg1)) return NULL;
    {
        arg0 = _PyInt_AsFont(obj0);
        if (PyErr_Occurred()) return NULL;
    }
    {
        result = (int )glutStrokeWidth(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutWireSphere(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    
    if(!PyArg_ParseTuple(args,"dii:glutWireSphere",&arg0,&arg1,&arg2)) return NULL;
    {
        glutWireSphere(arg0,arg1,arg2);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidSphere(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    
    if(!PyArg_ParseTuple(args,"dii:glutSolidSphere",&arg0,&arg1,&arg2)) return NULL;
    {
        glutSolidSphere(arg0,arg1,arg2);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireCone(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLdouble arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    
    if(!PyArg_ParseTuple(args,"ddii:glutWireCone",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutWireCone(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidCone(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLdouble arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    
    if(!PyArg_ParseTuple(args,"ddii:glutSolidCone",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutSolidCone(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireCube(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    
    if(!PyArg_ParseTuple(args,"d:glutWireCube",&arg0)) return NULL;
    {
        glutWireCube(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidCube(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    
    if(!PyArg_ParseTuple(args,"d:glutSolidCube",&arg0)) return NULL;
    {
        glutSolidCube(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireTorus(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLdouble arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    
    if(!PyArg_ParseTuple(args,"ddii:glutWireTorus",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutWireTorus(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidTorus(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    GLdouble arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    
    if(!PyArg_ParseTuple(args,"ddii:glutSolidTorus",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutSolidTorus(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireDodecahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutWireDodecahedron")) return NULL;
    {
        glutWireDodecahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidDodecahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSolidDodecahedron")) return NULL;
    {
        glutSolidDodecahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireTeapot(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    
    if(!PyArg_ParseTuple(args,"d:glutWireTeapot",&arg0)) return NULL;
    {
        glutWireTeapot(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidTeapot(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLdouble arg0 ;
    
    if(!PyArg_ParseTuple(args,"d:glutSolidTeapot",&arg0)) return NULL;
    {
        glutSolidTeapot(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireOctahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutWireOctahedron")) return NULL;
    {
        glutWireOctahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidOctahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSolidOctahedron")) return NULL;
    {
        glutSolidOctahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireTetrahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutWireTetrahedron")) return NULL;
    {
        glutWireTetrahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidTetrahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSolidTetrahedron")) return NULL;
    {
        glutSolidTetrahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutWireIcosahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutWireIcosahedron")) return NULL;
    {
        glutWireIcosahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSolidIcosahedron(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSolidIcosahedron")) return NULL;
    {
        glutSolidIcosahedron();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutExtensionSupported(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"s:glutExtensionSupported",&arg0)) return NULL;
    {
        result = (int )glutExtensionSupported((char const *)arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutFullScreen(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutFullScreen")) return NULL;
    {
        glutFullScreen();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutSetCursor(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutSetCursor",&arg0)) return NULL;
    {
        glutSetCursor(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutEstablishOverlay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutEstablishOverlay")) return NULL;
    {
        glutEstablishOverlay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutRemoveOverlay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutRemoveOverlay")) return NULL;
    {
        glutRemoveOverlay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutUseLayer(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    
    if(!PyArg_ParseTuple(args,"i:glutUseLayer",&arg0)) return NULL;
    {
        glutUseLayer(arg0);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutPostOverlayRedisplay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutPostOverlayRedisplay")) return NULL;
    {
        glutPostOverlayRedisplay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutShowOverlay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutShowOverlay")) return NULL;
    {
        glutShowOverlay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutHideOverlay(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutHideOverlay")) return NULL;
    {
        glutHideOverlay();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutGetModifiers(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result ;
    
    if(!PyArg_ParseTuple(args,":glutGetModifiers")) return NULL;
    {
        result = (int )glutGetModifiers();
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutLayerGet(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"i:glutLayerGet",&arg0)) return NULL;
    {
        result = (int )glutLayerGet(arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutWarpPointer(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    
    if(!PyArg_ParseTuple(args,"ii:glutWarpPointer",&arg0,&arg1)) return NULL;
    {
        glutWarpPointer(arg0,arg1);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutVideoResizeGet(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    int result ;
    
    if(!PyArg_ParseTuple(args,"i:glutVideoResizeGet",&arg0)) return NULL;
    {
        result = (int )glutVideoResizeGet(arg0);
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


static PyObject *_wrap_glutSetupVideoResizing(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutSetupVideoResizing")) return NULL;
    {
        glutSetupVideoResizing();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutStopVideoResizing(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    
    if(!PyArg_ParseTuple(args,":glutStopVideoResizing")) return NULL;
    {
        glutStopVideoResizing();
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutVideoResize(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    int arg2 ;
    int arg3 ;
    
    if(!PyArg_ParseTuple(args,"iiii:glutVideoResize",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutVideoResize(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glutVideoPan(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg0 ;
    int arg1 ;
    int arg2 ;
    int arg3 ;
    
    if(!PyArg_ParseTuple(args,"iiii:glutVideoPan",&arg0,&arg1,&arg2,&arg3)) return NULL;
    {
        glutVideoPan(arg0,arg1,arg2,arg3);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap___info(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    PyObject *result ;
    
    if(!PyArg_ParseTuple(args,":__info")) return NULL;
    {
        result = (PyObject *)__info();
        if (GLErrOccurred()) return NULL; 
    }{
        resultobj = result;
    }
    return resultobj;
}


static PyMethodDef GLUTMethods[] = {
	 {"glutInit", _wrap_glutInit, METH_VARARGS , _doc_glutInit},
	 {"glutInitDisplayMode", _wrap_glutInitDisplayMode, METH_VARARGS , _doc_glutInitDisplayMode},
	 {"glutInitWindowPosition", _wrap_glutInitWindowPosition, METH_VARARGS , _doc_glutInitWindowPosition},
	 {"glutInitWindowSize", _wrap_glutInitWindowSize, METH_VARARGS , _doc_glutInitWindowSize},
	 {"glutMainLoop", _wrap_glutMainLoop, METH_VARARGS , _doc_glutMainLoop},
	 {"glutDisplayFunc", _wrap_glutDisplayFunc, METH_VARARGS , _doc_glutDisplayFunc},
	 {"glutReshapeFunc", _wrap_glutReshapeFunc, METH_VARARGS , _doc_glutReshapeFunc},
	 {"glutKeyboardFunc", _wrap_glutKeyboardFunc, METH_VARARGS , _doc_glutKeyboardFunc},
	 {"glutMouseFunc", _wrap_glutMouseFunc, METH_VARARGS , _doc_glutMouseFunc},
	 {"glutMotionFunc", _wrap_glutMotionFunc, METH_VARARGS , _doc_glutMotionFunc},
	 {"glutPassiveMotionFunc", _wrap_glutPassiveMotionFunc, METH_VARARGS , _doc_glutPassiveMotionFunc},
	 {"glutEntryFunc", _wrap_glutEntryFunc, METH_VARARGS , _doc_glutEntryFunc},
	 {"glutVisibilityFunc", _wrap_glutVisibilityFunc, METH_VARARGS , _doc_glutVisibilityFunc},
	 {"glutSpecialFunc", _wrap_glutSpecialFunc, METH_VARARGS , _doc_glutSpecialFunc},
	 {"glutSpaceballMotionFunc", _wrap_glutSpaceballMotionFunc, METH_VARARGS , _doc_glutSpaceballMotionFunc},
	 {"glutSpaceballRotateFunc", _wrap_glutSpaceballRotateFunc, METH_VARARGS , _doc_glutSpaceballRotateFunc},
	 {"glutSpaceballButtonFunc", _wrap_glutSpaceballButtonFunc, METH_VARARGS , _doc_glutSpaceballButtonFunc},
	 {"glutButtonBoxFunc", _wrap_glutButtonBoxFunc, METH_VARARGS , _doc_glutButtonBoxFunc},
	 {"glutDialsFunc", _wrap_glutDialsFunc, METH_VARARGS , _doc_glutDialsFunc},
	 {"glutTabletMotionFunc", _wrap_glutTabletMotionFunc, METH_VARARGS , _doc_glutTabletMotionFunc},
	 {"glutTabletButtonFunc", _wrap_glutTabletButtonFunc, METH_VARARGS , _doc_glutTabletButtonFunc},
	 {"glutOverlayDisplayFunc", _wrap_glutOverlayDisplayFunc, METH_VARARGS , _doc_glutOverlayDisplayFunc},
	 {"glutIdleFunc", _wrap_glutIdleFunc, METH_VARARGS , _doc_glutIdleFunc},
	 {"glutTimerFunc", _wrap_glutTimerFunc, METH_VARARGS , _doc_glutTimerFunc},
	 {"glutMenuStateFunc", _wrap_glutMenuStateFunc, METH_VARARGS , _doc_glutMenuStateFunc},
	 {"glutMenuStatusFunc", _wrap_glutMenuStatusFunc, METH_VARARGS , _doc_glutMenuStatusFunc},
	 {"glutWindowStatusFunc", _wrap_glutWindowStatusFunc, METH_VARARGS , _doc_glutWindowStatusFunc},
	 {"glutCreateWindow", _wrap_glutCreateWindow, METH_VARARGS , _doc_glutCreateWindow},
	 {"glutCreateSubWindow", _wrap_glutCreateSubWindow, METH_VARARGS , _doc_glutCreateSubWindow},
	 {"glutDestroyWindow", _wrap_glutDestroyWindow, METH_VARARGS , _doc_glutDestroyWindow},
	 {"glutPostRedisplay", _wrap_glutPostRedisplay, METH_VARARGS , _doc_glutPostRedisplay},
	 {"glutSwapBuffers", _wrap_glutSwapBuffers, METH_VARARGS , _doc_glutSwapBuffers},
	 {"glutGetWindow", _wrap_glutGetWindow, METH_VARARGS , _doc_glutGetWindow},
	 {"glutSetWindow", _wrap_glutSetWindow, METH_VARARGS , _doc_glutSetWindow},
	 {"glutSetWindowTitle", _wrap_glutSetWindowTitle, METH_VARARGS , _doc_glutSetWindowTitle},
	 {"glutSetIconTitle", _wrap_glutSetIconTitle, METH_VARARGS , _doc_glutSetIconTitle},
	 {"glutPositionWindow", _wrap_glutPositionWindow, METH_VARARGS , _doc_glutPositionWindow},
	 {"glutReshapeWindow", _wrap_glutReshapeWindow, METH_VARARGS , _doc_glutReshapeWindow},
	 {"glutPopWindow", _wrap_glutPopWindow, METH_VARARGS , _doc_glutPopWindow},
	 {"glutPushWindow", _wrap_glutPushWindow, METH_VARARGS , _doc_glutPushWindow},
	 {"glutIconifyWindow", _wrap_glutIconifyWindow, METH_VARARGS , _doc_glutIconifyWindow},
	 {"glutShowWindow", _wrap_glutShowWindow, METH_VARARGS , _doc_glutShowWindow},
	 {"glutHideWindow", _wrap_glutHideWindow, METH_VARARGS , _doc_glutHideWindow},
	 {"glutCreateMenu", _wrap_glutCreateMenu, METH_VARARGS , _doc_glutCreateMenu},
	 {"glutDestroyMenu", _wrap_glutDestroyMenu, METH_VARARGS , _doc_glutDestroyMenu},
	 {"glutGetMenu", _wrap_glutGetMenu, METH_VARARGS , _doc_glutGetMenu},
	 {"glutSetMenu", _wrap_glutSetMenu, METH_VARARGS , _doc_glutSetMenu},
	 {"glutAddMenuEntry", _wrap_glutAddMenuEntry, METH_VARARGS , _doc_glutAddMenuEntry},
	 {"glutAddSubMenu", _wrap_glutAddSubMenu, METH_VARARGS , _doc_glutAddSubMenu},
	 {"glutChangeToMenuEntry", _wrap_glutChangeToMenuEntry, METH_VARARGS , _doc_glutChangeToMenuEntry},
	 {"glutChangeToSubMenu", _wrap_glutChangeToSubMenu, METH_VARARGS , _doc_glutChangeToSubMenu},
	 {"glutRemoveMenuItem", _wrap_glutRemoveMenuItem, METH_VARARGS , _doc_glutRemoveMenuItem},
	 {"glutAttachMenu", _wrap_glutAttachMenu, METH_VARARGS , _doc_glutAttachMenu},
	 {"glutDetachMenu", _wrap_glutDetachMenu, METH_VARARGS , _doc_glutDetachMenu},
	 {"glutSetColor", _wrap_glutSetColor, METH_VARARGS , _doc_glutSetColor},
	 {"glutGetColor", _wrap_glutGetColor, METH_VARARGS , _doc_glutGetColor},
	 {"glutCopyColormap", _wrap_glutCopyColormap, METH_VARARGS , _doc_glutCopyColormap},
	 {"glutGet", _wrap_glutGet, METH_VARARGS , _doc_glutGet},
	 {"glutDeviceGet", _wrap_glutDeviceGet, METH_VARARGS , _doc_glutDeviceGet},
	 {"glutBitmapCharacter", _wrap_glutBitmapCharacter, METH_VARARGS , _doc_glutBitmapCharacter},
	 {"glutBitmapWidth", _wrap_glutBitmapWidth, METH_VARARGS , _doc_glutBitmapWidth},
	 {"glutStrokeCharacter", _wrap_glutStrokeCharacter, METH_VARARGS , _doc_glutStrokeCharacter},
	 {"glutStrokeWidth", _wrap_glutStrokeWidth, METH_VARARGS , _doc_glutStrokeWidth},
	 {"glutWireSphere", _wrap_glutWireSphere, METH_VARARGS , _doc_glutWireSphere},
	 {"glutSolidSphere", _wrap_glutSolidSphere, METH_VARARGS , _doc_glutSolidSphere},
	 {"glutWireCone", _wrap_glutWireCone, METH_VARARGS , _doc_glutWireCone},
	 {"glutSolidCone", _wrap_glutSolidCone, METH_VARARGS , _doc_glutSolidCone},
	 {"glutWireCube", _wrap_glutWireCube, METH_VARARGS , _doc_glutWireCube},
	 {"glutSolidCube", _wrap_glutSolidCube, METH_VARARGS , _doc_glutSolidCube},
	 {"glutWireTorus", _wrap_glutWireTorus, METH_VARARGS , _doc_glutWireTorus},
	 {"glutSolidTorus", _wrap_glutSolidTorus, METH_VARARGS , _doc_glutSolidTorus},
	 {"glutWireDodecahedron", _wrap_glutWireDodecahedron, METH_VARARGS , _doc_glutWireDodecahedron},
	 {"glutSolidDodecahedron", _wrap_glutSolidDodecahedron, METH_VARARGS , _doc_glutSolidDodecahedron},
	 {"glutWireTeapot", _wrap_glutWireTeapot, METH_VARARGS , _doc_glutWireTeapot},
	 {"glutSolidTeapot", _wrap_glutSolidTeapot, METH_VARARGS , _doc_glutSolidTeapot},
	 {"glutWireOctahedron", _wrap_glutWireOctahedron, METH_VARARGS , _doc_glutWireOctahedron},
	 {"glutSolidOctahedron", _wrap_glutSolidOctahedron, METH_VARARGS , _doc_glutSolidOctahedron},
	 {"glutWireTetrahedron", _wrap_glutWireTetrahedron, METH_VARARGS , _doc_glutWireTetrahedron},
	 {"glutSolidTetrahedron", _wrap_glutSolidTetrahedron, METH_VARARGS , _doc_glutSolidTetrahedron},
	 {"glutWireIcosahedron", _wrap_glutWireIcosahedron, METH_VARARGS , _doc_glutWireIcosahedron},
	 {"glutSolidIcosahedron", _wrap_glutSolidIcosahedron, METH_VARARGS , _doc_glutSolidIcosahedron},
	 {"glutExtensionSupported", _wrap_glutExtensionSupported, METH_VARARGS , _doc_glutExtensionSupported},
	 {"glutFullScreen", _wrap_glutFullScreen, METH_VARARGS , _doc_glutFullScreen},
	 {"glutSetCursor", _wrap_glutSetCursor, METH_VARARGS , _doc_glutSetCursor},
	 {"glutEstablishOverlay", _wrap_glutEstablishOverlay, METH_VARARGS , _doc_glutEstablishOverlay},
	 {"glutRemoveOverlay", _wrap_glutRemoveOverlay, METH_VARARGS , _doc_glutRemoveOverlay},
	 {"glutUseLayer", _wrap_glutUseLayer, METH_VARARGS , _doc_glutUseLayer},
	 {"glutPostOverlayRedisplay", _wrap_glutPostOverlayRedisplay, METH_VARARGS , _doc_glutPostOverlayRedisplay},
	 {"glutShowOverlay", _wrap_glutShowOverlay, METH_VARARGS , _doc_glutShowOverlay},
	 {"glutHideOverlay", _wrap_glutHideOverlay, METH_VARARGS , _doc_glutHideOverlay},
	 {"glutGetModifiers", _wrap_glutGetModifiers, METH_VARARGS , _doc_glutGetModifiers},
	 {"glutLayerGet", _wrap_glutLayerGet, METH_VARARGS , _doc_glutLayerGet},
	 {"glutWarpPointer", _wrap_glutWarpPointer, METH_VARARGS , _doc_glutWarpPointer},
	 {"glutVideoResizeGet", _wrap_glutVideoResizeGet, METH_VARARGS , _doc_glutVideoResizeGet},
	 {"glutSetupVideoResizing", _wrap_glutSetupVideoResizing, METH_VARARGS , _doc_glutSetupVideoResizing},
	 {"glutStopVideoResizing", _wrap_glutStopVideoResizing, METH_VARARGS , _doc_glutStopVideoResizing},
	 {"glutVideoResize", _wrap_glutVideoResize, METH_VARARGS , _doc_glutVideoResize},
	 {"glutVideoPan", _wrap_glutVideoPan, METH_VARARGS , _doc_glutVideoPan},
	 { "__info", _wrap___info, METH_VARARGS },
	 { NULL, NULL }
};

#ifdef __cplusplus
}
#endif

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */


static swig_type_info *swig_types_initial[] = {
0
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
    { SWIG_PY_STRING, "__version__", 0, 0, (void *) "1.43", 0 }, 
    { SWIG_PY_STRING, "__date__", 0, 0, (void *) "2001/08/17 16:54:05", 0 }, 
    { SWIG_PY_INT,     "__api_version__", (long) 7, 0, 0, 0},
    { SWIG_PY_STRING, "__author__", 0, 0, (void *) "Tarn Weisner Burton <twburton@users.sourceforge.net>\nMike C. Fletcher <mcfletch@users.sourceforge.net>", 0 }, 
    { SWIG_PY_STRING, "__credits__", 0, 0, (void *) "The GLUT module of PyOpenGL is based on PyGLUT by Andrew Cox.", 0 }, 
    { SWIG_PY_STRING, "__doc__", 0, 0, (void *) "The module provides an interface to the GLUT library.\n\nDocumentation:\n    Man Pages:  http://pyopengl.sourceforge.net/documentation/ref/glut.html\n    GLUT Homepage:  http://reality.sgi.com/mjk/glut3/glut3.html\n    OpenGL.org:  http://www.opengl.org/developers/documentation/glut.html", 0 }, 
    { SWIG_PY_INT,     "GLUT_XLIB_IMPLEMENTATION", (long) 7, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_API_VERSION", (long) 3, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_RGB", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_RGBA", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INDEX", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_SINGLE", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_DOUBLE", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ACCUM", (long) 4, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ALPHA", (long) 8, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_DEPTH", (long) 16, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_STENCIL", (long) 32, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_LEFT_BUTTON", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_MIDDLE_BUTTON", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_RIGHT_BUTTON", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_DOWN", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_UP", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_LEFT", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ENTERED", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_MENU_NOT_IN_USE", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_MENU_IN_USE", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NOT_VISIBLE", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VISIBLE", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HIDDEN", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_FULLY_RETAINED", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_PARTIALLY_RETAINED", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_FULLY_COVERED", (long) 3, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_RED", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_GREEN", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BLUE", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_STROKE_ROMAN", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_STROKE_MONO_ROMAN", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_9_BY_15", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_8_BY_13", (long) 3, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_TIMES_ROMAN_10", (long) 4, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_TIMES_ROMAN_24", (long) 5, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_X", (long) 100, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_Y", (long) 101, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_WIDTH", (long) 102, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_HEIGHT", (long) 103, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_BUFFER_SIZE", (long) 104, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_STENCIL_SIZE", (long) 105, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_DEPTH_SIZE", (long) 106, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_RED_SIZE", (long) 107, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_GREEN_SIZE", (long) 108, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_BLUE_SIZE", (long) 109, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_ALPHA_SIZE", (long) 110, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_ACCUM_RED_SIZE", (long) 111, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_ACCUM_GREEN_SIZE", (long) 112, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_ACCUM_BLUE_SIZE", (long) 113, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_ACCUM_ALPHA_SIZE", (long) 114, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_DOUBLEBUFFER", (long) 115, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_RGBA", (long) 116, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_PARENT", (long) 117, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_NUM_CHILDREN", (long) 118, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_COLORMAP_SIZE", (long) 119, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_SCREEN_WIDTH", (long) 200, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_SCREEN_HEIGHT", (long) 201, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_SCREEN_WIDTH_MM", (long) 202, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_SCREEN_HEIGHT_MM", (long) 203, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_MENU_NUM_ITEMS", (long) 300, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_DISPLAY_MODE_POSSIBLE", (long) 400, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INIT_WINDOW_X", (long) 500, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INIT_WINDOW_Y", (long) 501, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INIT_WINDOW_WIDTH", (long) 502, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INIT_WINDOW_HEIGHT", (long) 503, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_INIT_DISPLAY_MODE", (long) 504, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_MULTISAMPLE", (long) 128, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_STEREO", (long) 256, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F1", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F2", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F3", (long) 3, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F4", (long) 4, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F5", (long) 5, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F6", (long) 6, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F7", (long) 7, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F8", (long) 8, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F9", (long) 9, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F10", (long) 10, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F11", (long) 11, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_F12", (long) 12, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_LEFT", (long) 100, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_UP", (long) 101, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_RIGHT", (long) 102, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_DOWN", (long) 103, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_PAGE_UP", (long) 104, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_PAGE_DOWN", (long) 105, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_HOME", (long) 106, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_END", (long) 107, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_KEY_INSERT", (long) 108, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_NUM_SAMPLES", (long) 120, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_STEREO", (long) 121, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ELAPSED_TIME", (long) 700, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_KEYBOARD", (long) 600, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_MOUSE", (long) 601, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_SPACEBALL", (long) 602, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_DIAL_AND_BUTTON_BOX", (long) 603, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_TABLET", (long) 604, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NUM_MOUSE_BUTTONS", (long) 605, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NUM_SPACEBALL_BUTTONS", (long) 606, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NUM_BUTTON_BOX_BUTTONS", (long) 607, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NUM_DIALS", (long) 608, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NUM_TABLET_BUTTONS", (long) 609, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_LUMINANCE", (long) 512, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_HELVETICA_10", (long) 6, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_HELVETICA_12", (long) 7, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_BITMAP_HELVETICA_18", (long) 8, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_WINDOW_CURSOR", (long) 122, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_OVERLAY_POSSIBLE", (long) 800, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_LAYER_IN_USE", (long) 801, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_HAS_OVERLAY", (long) 802, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_TRANSPARENT_INDEX", (long) 803, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NORMAL_DAMAGED", (long) 804, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_OVERLAY_DAMAGED", (long) 805, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_NORMAL", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_OVERLAY", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ACTIVE_SHIFT", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ACTIVE_CTRL", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_ACTIVE_ALT", (long) 4, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_RIGHT_ARROW", (long) 0, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_LEFT_ARROW", (long) 1, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_INFO", (long) 2, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_DESTROY", (long) 3, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_HELP", (long) 4, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_CYCLE", (long) 5, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_SPRAY", (long) 6, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_WAIT", (long) 7, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_TEXT", (long) 8, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_CROSSHAIR", (long) 9, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_UP_DOWN", (long) 10, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_LEFT_RIGHT", (long) 11, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_TOP_SIDE", (long) 12, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_BOTTOM_SIDE", (long) 13, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_LEFT_SIDE", (long) 14, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_RIGHT_SIDE", (long) 15, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_TOP_LEFT_CORNER", (long) 16, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_TOP_RIGHT_CORNER", (long) 17, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_BOTTOM_RIGHT_CORNER", (long) 18, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_BOTTOM_LEFT_CORNER", (long) 19, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_INHERIT", (long) 100, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_NONE", (long) 101, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_CURSOR_FULL_CROSSHAIR", (long) 102, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_POSSIBLE", (long) 900, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_IN_USE", (long) 901, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_X_DELTA", (long) 902, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_Y_DELTA", (long) 903, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_WIDTH_DELTA", (long) 904, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_HEIGHT_DELTA", (long) 905, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_X", (long) 906, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_Y", (long) 907, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_WIDTH", (long) 908, 0, 0, 0},
    { SWIG_PY_INT,     "GLUT_VIDEO_RESIZE_HEIGHT", (long) 909, 0, 0, 0},
{0}};

static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT(void) initGLUT(void) {
    PyObject *m, *d;
    int i;
    SWIG_globals = SWIG_newvarlink();
    m = Py_InitModule("GLUT", GLUTMethods);
    d = PyModule_GetDict(m);
    for (i = 0; swig_types_initial[i]; i++) {
        swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
    }
    
    #ifdef NUMERIC
    PyArray_API = NULL;
    import_array();
    init_util();
    PyErr_Clear();
    #endif
    
    {
        PyObject *util = PyImport_ImportModule("OpenGL.GL.__init___");
        if (util)
        {
            PyObject *api_object = PyDict_GetItemString(PyModule_GetDict(util), "_util_API");
            if (PyCObject_Check(api_object)) _util_API = (util_API*)PyCObject_AsVoidPtr(api_object);
        }
    }
    
    windows = PyDict_New();
    menus = PyDict_New();
    SWIG_InstallConstants(d,swig_const_table);
}

