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

#define SWIG_name    "texture4D"

/**
 *
 * GL.SGIS.texture4D Module for PyOpenGL
 * 
 * Date: May 2000
 *
 * Authors: Tarn Weisner Burton <twburton@users.sourceforge.net>
 * 
***/


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;
}


#if !EXT_DEFINES_PROTO || !defined(GL_SGIS_texture4D)
DECLARE_VOID_EXT(glTexImage4DSGIS,\
	(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid *pixels),\
	(target, level, internalFormat, width, height, depth, extent, border, format, type, pixels))
DECLARE_VOID_EXT(glTexSubImage4DSGIS,\
	(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void *buffer),\
	(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, extent, format, type, buffer))
#endif

static char *proc_names[] =
{
#if !EXT_DEFINES_PROTO || !defined(GL_SGIS_texture4D)
	"glTexImage4DSGIS",
	"glTexSubImage4DSGIS",
#endif
	NULL
};

#define glInitTexture4DSGIS() InitExtension("GL_SGIS_texture4D", proc_names)
 static char _doc_glInitTexture4DSGIS[] = "glInitTexture4DSGIS() -> bool";
 static char _doc_glInitTex4DSGIS[] = "glInitTex4DSGIS() -> bool";
 static char _doc_glTexImage4DSGIS[] = "glTexImage4DSGIS(target, level, internalFormat, width, height, depth, extent, border, format, type, pixels) -> None";

void _glTexImage4DSGIS(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
{
	SetupPixelWrite(3);
	glTexImage4DSGIS(target, level, internalFormat, width, height, depth, extent, border, format, type, pixels);
}
 static char _doc_glTexImage4DubEXT[] = "glTexImage4DubEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DbEXT[] = "glTexImage4DbEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DusEXT[] = "glTexImage4DusEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DsEXT[] = "glTexImage4DsEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DuiEXT[] = "glTexImage4DuiEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DiEXT[] = "glTexImage4DiEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexImage4DfEXT[] = "glTexImage4DfEXT(target, level, internalFormat, border, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DSGIS[] = "glTexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, extent, format, type, pixels) -> None";

void _glTexSubImage4DSGIS(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const GLvoid* pixels)
{
	SetupPixelWrite(4);
	glTexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, extent, format, type, pixels);
}
 static char _doc_glTexSubImage4DubEXT[] = "glTexSubImage4DubEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DbEXT[] = "glTexSubImage4DbEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DusEXT[] = "glTexSubImage4DusEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DsEXT[] = "glTexSubImage4DsEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DuiEXT[] = "glTexSubImage4DuiEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DiEXT[] = "glTexSubImage4DiEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";
 static char _doc_glTexSubImage4DfEXT[] = "glTexSubImage4DfEXT(target, level, xoffset, yoffset, zoffset, woffset, format, type, pixels) -> None";

#ifndef GL_SGIS_texture4D
#define GL_MAX_4D_TEXTURE_SIZE_SGIS          0x84E2
#endif

PyObject *__info()
{
	if (glInitTexture4DSGIS())
	{
		PyObject *info = PyList_New(0);
		PyList_Append(info, Py_BuildValue("sis", "GL_MAX_4D_TEXTURE_SIZE_SGIS", GL_MAX_4D_TEXTURE_SIZE_SGIS, "i"));
		return info;
	}
	
	Py_INCREF(Py_None);
	return Py_None;
}
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_glInitTexture4DSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result ;
    
    if(!PyArg_ParseTuple(args,":glInitTexture4DSGIS")) return NULL;
    {
        result = (int )glInitTexture4DSGIS();
        if (GLErrOccurred()) return NULL; 
    }    resultobj = PyInt_FromLong((long)result);
    return resultobj;
}


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


static PyObject *_wrap_glTexImage4DSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    void *arg10 ;
    PyObject * obj10  = 0 ;
    
    if(!PyArg_ParseTuple(args,"iiiiiiiiiiO:glTexImage4DSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg6,&arg7,&arg8,&arg9,&obj10)) return NULL;
    {
        int len;
        PyObject* str;
        if (obj10 == Py_None) arg10 = NULL; else
        {
            str = PyObject_Str(obj10);
            PyString_AsStringAndSize(str, (char**)&arg10, &len);
            Py_DECREF(str);
        }
    }
    {
        glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(void const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glTexImage4DubSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLubyte *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_UNSIGNED_BYTE;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DubSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsUnsignedCharArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLubyte const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DbSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLbyte *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_BYTE;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DbSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsCharArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLbyte const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DusSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLushort *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_UNSIGNED_SHORT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DusSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsUnsignedShortArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLushort const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DsSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLshort *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_SHORT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DsSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsShortArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLshort const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DuiSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLuint *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_UNSIGNED_INT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DuiSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsUnsignedIntArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLuint const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DiSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLint *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_INT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DiSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsIntArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLint const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexImage4DfSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLsizei arg3 ;
    GLsizei arg4 ;
    GLsizei arg5 ;
    GLsizei arg6 ;
    GLint arg7 ;
    GLenum arg8 ;
    GLenum arg9 ;
    GLfloat *arg10 ;
    PyObject *temp_pixels ;
    PyObject * obj10  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg9 = GL_FLOAT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiO:glTexImage4DfSGIS",&arg0,&arg1,&arg2,&arg7,&arg8,&obj10)) return NULL;
    if (obj10)
    {
        arg10 = _PyObject_AsFloatArray(obj10, &temp_pixels, NULL); 
    }
    {
        arg3 = (GLsizei)_PyObject_Dimension(obj10, 3); 
    }
    {
        arg4 = (GLsizei)_PyObject_Dimension(obj10, 2); 
    }
    {
        arg5 = (GLsizei)_PyObject_Dimension(obj10, 1); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj10, 0); 
    }
    {
        _glTexImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(GLfloat const *)arg10);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg10, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    void *arg12 ;
    PyObject * obj12  = 0 ;
    
    if(!PyArg_ParseTuple(args,"iiiiiiiiiiiiO:glTexSubImage4DSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg6,&arg7,&arg8,&arg9,&arg10,&arg11,&obj12)) return NULL;
    {
        int len;
        PyObject* str;
        if (obj12 == Py_None) arg12 = NULL; else
        {
            str = PyObject_Str(obj12);
            PyString_AsStringAndSize(str, (char**)&arg12, &len);
            Py_DECREF(str);
        }
    }
    {
        glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(void const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DubSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLubyte *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_UNSIGNED_BYTE;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DubSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsUnsignedCharArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLubyte const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DbSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLbyte *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_BYTE;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DbSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsCharArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLbyte const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DusSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLushort *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_UNSIGNED_SHORT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DusSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsUnsignedShortArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLushort const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DsSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLshort *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_SHORT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DsSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsShortArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLshort const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DuiSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLuint *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_UNSIGNED_INT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DuiSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsUnsignedIntArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLuint const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DiSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLint *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_INT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DiSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsIntArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLint const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    return resultobj;
}


static PyObject *_wrap_glTexSubImage4DfSGIS(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    GLenum arg0 ;
    GLint arg1 ;
    GLint arg2 ;
    GLint arg3 ;
    GLint arg4 ;
    GLint arg5 ;
    GLsizei arg6 ;
    GLsizei arg7 ;
    GLsizei arg8 ;
    GLsizei arg9 ;
    GLenum arg10 ;
    GLenum arg11 ;
    GLfloat *arg12 ;
    PyObject *temp_pixels ;
    PyObject * obj12  = 0 ;
    
    {
    }
    {
    }
    {
    }
    {
    }
    {
        arg11 = GL_FLOAT;
    }
    if(!PyArg_ParseTuple(args,"iiiiiiiO:glTexSubImage4DfSGIS",&arg0,&arg1,&arg2,&arg3,&arg4,&arg5,&arg10,&obj12)) return NULL;
    if (obj12)
    {
        arg12 = _PyObject_AsFloatArray(obj12, &temp_pixels, NULL); 
    }
    {
        arg6 = (GLsizei)_PyObject_Dimension(obj12, 3); 
    }
    {
        arg7 = (GLsizei)_PyObject_Dimension(obj12, 2); 
    }
    {
        arg8 = (GLsizei)_PyObject_Dimension(obj12, 1); 
    }
    {
        arg9 = (GLsizei)_PyObject_Dimension(obj12, 0); 
    }
    {
        _glTexSubImage4DSGIS(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,(GLfloat const *)arg12);
        if (GLErrOccurred()) return NULL; 
    }    Py_INCREF(Py_None);
    resultobj = Py_None;
    {
        _PyObject_AsArray_Cleanup(arg12, temp_pixels); 
    }
    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 texture4DMethods[] = {
	 {"glInitTexture4DSGIS", _wrap_glInitTexture4DSGIS, METH_VARARGS , _doc_glInitTexture4DSGIS},
	 {"glInitTex4DSGIS", _wrap_glInitTex4DSGIS, METH_VARARGS , _doc_glInitTex4DSGIS},
	 {"glTexImage4DSGIS", _wrap_glTexImage4DSGIS, METH_VARARGS , _doc_glTexImage4DSGIS},
	 { "glTexImage4DubSGIS", _wrap_glTexImage4DubSGIS, METH_VARARGS },
	 { "glTexImage4DbSGIS", _wrap_glTexImage4DbSGIS, METH_VARARGS },
	 { "glTexImage4DusSGIS", _wrap_glTexImage4DusSGIS, METH_VARARGS },
	 { "glTexImage4DsSGIS", _wrap_glTexImage4DsSGIS, METH_VARARGS },
	 { "glTexImage4DuiSGIS", _wrap_glTexImage4DuiSGIS, METH_VARARGS },
	 { "glTexImage4DiSGIS", _wrap_glTexImage4DiSGIS, METH_VARARGS },
	 { "glTexImage4DfSGIS", _wrap_glTexImage4DfSGIS, METH_VARARGS },
	 {"glTexSubImage4DSGIS", _wrap_glTexSubImage4DSGIS, METH_VARARGS , _doc_glTexSubImage4DSGIS},
	 { "glTexSubImage4DubSGIS", _wrap_glTexSubImage4DubSGIS, METH_VARARGS },
	 { "glTexSubImage4DbSGIS", _wrap_glTexSubImage4DbSGIS, METH_VARARGS },
	 { "glTexSubImage4DusSGIS", _wrap_glTexSubImage4DusSGIS, METH_VARARGS },
	 { "glTexSubImage4DsSGIS", _wrap_glTexSubImage4DsSGIS, METH_VARARGS },
	 { "glTexSubImage4DuiSGIS", _wrap_glTexSubImage4DuiSGIS, METH_VARARGS },
	 { "glTexSubImage4DiSGIS", _wrap_glTexSubImage4DiSGIS, METH_VARARGS },
	 { "glTexSubImage4DfSGIS", _wrap_glTexSubImage4DfSGIS, METH_VARARGS },
	 { "__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.17", 0 }, 
    { SWIG_PY_STRING, "__date__", 0, 0, (void *) "2001/08/17 16:54:07", 0 }, 
    { SWIG_PY_INT,     "__api_version__", (long) 281, 0, 0, 0},
    { SWIG_PY_STRING, "__author__", 0, 0, (void *) "Tarn Weisner Burton <twburton@users.sourceforge.net>", 0 }, 
    { SWIG_PY_STRING, "__doc__", 0, 0, (void *) "http://oss.sgi.com/projects/ogl-sample/registry/SGIS/texture4D.txt", 0 }, 
    { SWIG_PY_INT,     "GL_PACK_SKIP_VOLUMES_SGIS", (long) 0x8130, 0, 0, 0},
    { SWIG_PY_INT,     "GL_PACK_IMAGE_DEPTH_SGIS", (long) 0x8131, 0, 0, 0},
    { SWIG_PY_INT,     "GL_UNPACK_SKIP_VOLUMES_SGIS", (long) 0x8132, 0, 0, 0},
    { SWIG_PY_INT,     "GL_UNPACK_IMAGE_DEPTH_SGIS", (long) 0x8133, 0, 0, 0},
    { SWIG_PY_INT,     "GL_TEXTURE_4D_SGIS", (long) 0x8134, 0, 0, 0},
    { SWIG_PY_INT,     "GL_PROXY_TEXTURE_4D_SGIS", (long) 0x8135, 0, 0, 0},
    { SWIG_PY_INT,     "GL_TEXTURE_4DSIZE_SGIS", (long) 0x8136, 0, 0, 0},
    { SWIG_PY_INT,     "GL_TEXTURE_WRAP_Q_SGIS", (long) 0x8137, 0, 0, 0},
    { SWIG_PY_INT,     "GL_MAX_4D_TEXTURE_SIZE_SGIS", (long) 0x8138, 0, 0, 0},
    { SWIG_PY_INT,     "GL_TEXTURE_4D_BINDING_SGIS", (long) 0x814F, 0, 0, 0},
{0}};

static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT(void) inittexture4D(void) {
    PyObject *m, *d;
    int i;
    SWIG_globals = SWIG_newvarlink();
    m = Py_InitModule("texture4D", texture4DMethods);
    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);
        }
    }
    SWIG_InstallConstants(d,swig_const_table);
}

