/* Generated by Pyrex 0.9.5.1a on Thu Aug  2 17:01:05 2007 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
__PYX_EXTERN_C double pow(double, double);
#include "stdlib.h"
#include "GL/gl.h"


typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_GetExcValue(void); /*proto*/

static void __Pyx_ReRaise(void); /*proto*/

static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static void __Pyx_AddTraceback(char *funcname); /*proto*/

/* Declarations from rabbyt.vertexarrays */

struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s {
  float x;
  float y;
  float u;
  float v;
  unsigned char red;
  unsigned char green;
  unsigned char blue;
  unsigned char alpha;
};


struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray {
  PyObject_HEAD
  struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray *__pyx_vtab;
  struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s (*_vertex_info);
  int _len;
  int _allocated_size;
  int _use_colors;
  PyObject *texture_id;
  int _mode;
};

struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray {
  PyObject *((*_grow)(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *,int ,PyObject *));
};
static struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray *__pyx_vtabptr_6rabbyt_12vertexarrays_VertexArray;


struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes {
  PyObject_HEAD
  struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes *__pyx_vtab;
  unsigned int (*_indexes);
  unsigned int _len;
  unsigned int _allocated_size;
  unsigned int _mode;
};

struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes {
  PyObject *((*_grow)(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *,int ,PyObject *));
};
static struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes *__pyx_vtabptr_6rabbyt_12vertexarrays_VertexArrayIndexes;


struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo {
  PyObject_HEAD
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *_parent;
  unsigned int _index;
};

static PyTypeObject *__pyx_ptype_6rabbyt_12vertexarrays_VertexArray = 0;
static PyTypeObject *__pyx_ptype_6rabbyt_12vertexarrays_VertexArrayIndexes = 0;
static PyTypeObject *__pyx_ptype_6rabbyt_12vertexarrays_VertexInfo = 0;
static PyObject *__pyx_k16;
static PyObject *__pyx_k17;
static PyObject *__pyx_k18;
static PyObject *__pyx_k19;
static PyObject *__pyx_k20;
static int __pyx_k21;
static PyObject *__pyx_k22;
static PyObject *__pyx_k23;
static PyObject *__pyx_k24;
static unsigned char (__pyx_f_6rabbyt_12vertexarrays__to255(float )); /*proto*/


/* Implementation of rabbyt.vertexarrays */

static char (__pyx_k1[]) = "\n        If ``True``, (the default,) the color data in the vertex array will be\n        used. Otherwise, the previous color will be used for all vertexes.\n        (such as set by ``rabbyt.set_gl_color()``.)\n        ";
static char (__pyx_k2[]) = "\n        The default primitive drawing mode.\n\n        Valid modes are \"QUADS\", \"QUAD_STRIP\", \"TRIANGLES\", \"TRIANGLE_STRIP\",\n        \"TRIANGLE_FAN\", \"LINES\", \"LINE_STRIP\", \"LINE_LOOP\", or \"POINTS\".  These\n        corrispond directly to the OpenGL privitive drawing modes.  (In fact,\n        you can also use the OpenGL enumerations instead of the strings, if you\n        prefer.)\n        ";
static char (__pyx_k3[]) = "\n        If non zero, this mode will override the ``VertexArray``\'s mode when\n        render is called.\n        ";
static char (__pyx_k4[]) = "\nCopyright (C) 2007  Matthew Marshall\n\nThis library is free software; you can redistribute it and/or\nmodify it under the terms of the GNU Library General Public\nLicense as published by the Free Software Foundation; either\nversion 2 of the License, or (at your option) any later version.\n\nThis library is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nLibrary General Public License for more details.\n\nYou should have received a copy of the GNU Library General Public\nLicense along with this library; if not, write to the Free\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n";
static char (__pyx_k5[]) = "Matthew Marshall <matthew@matthewmarshall.org>";
static char (__pyx_k25[]) = "VertexArray VertexInfo VertexArrayIndexes";

static PyObject *__pyx_n___credits__;
static PyObject *__pyx_n___author__;
static PyObject *__pyx_n__mode_mapping;
static PyObject *__pyx_n_key;
static PyObject *__pyx_n___docs_all__;
static PyObject *__pyx_n_QUADS;
static PyObject *__pyx_n_QUAD_STRIP;
static PyObject *__pyx_n_TRIANGLES;
static PyObject *__pyx_n_TRIANGLE_STRIP;
static PyObject *__pyx_n_TRIANGLE_FAN;
static PyObject *__pyx_n_LINES;
static PyObject *__pyx_n_LINE_STRIP;
static PyObject *__pyx_n_LINE_LOOP;
static PyObject *__pyx_n_POINTS;
static PyObject *__pyx_n_list;
static PyObject *__pyx_n_True;
static PyObject *__pyx_n_split;

static PyObject *__pyx_k4p;
static PyObject *__pyx_k5p;
static PyObject *__pyx_k25p;

static PyObject *__pyx_n_mode;

static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_use_colors = 0;
  int __pyx_r;
  int __pyx_1;
  static char *__pyx_argnames[] = {"mode","use_colors",0};
  __pyx_v_mode = __pyx_k16;
  __pyx_v_use_colors = __pyx_k17;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_mode, &__pyx_v_use_colors)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_mode);
  Py_INCREF(__pyx_v_use_colors);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":136 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_mode, __pyx_v_mode) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":137 */
  __pyx_1 = PyInt_AsLong(__pyx_v_use_colors); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_use_colors = __pyx_1;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":138 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":139 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_allocated_size = 4;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":140 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info = ((struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s (*))malloc(((sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )) * 4)));

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":141 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->texture_id);
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->texture_id = Py_None;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_mode);
  Py_DECREF(__pyx_v_use_colors);
  return __pyx_r;
}

static void __pyx_f_6rabbyt_12vertexarrays_11VertexArray___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_f_6rabbyt_12vertexarrays_11VertexArray___dealloc__(PyObject *__pyx_v_self) {
  int __pyx_1;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":144 */
  __pyx_1 = (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info != NULL);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":145 */
    free(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info);
    goto __pyx_L2;
  }
  __pyx_L2:;

  Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_n_bool;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":154 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_use_colors); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.use_colors.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_c); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_c) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_c);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":156 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; goto __pyx_L1;}
  Py_INCREF(__pyx_v_c);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_c);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_use_colors = __pyx_4;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.use_colors.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_c);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":169 */
  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_mode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.mode.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_isinstance;
static PyObject *__pyx_n_basestring;
static PyObject *__pyx_n_ValueError;

static PyObject *__pyx_k26p;

static char (__pyx_k26[]) = "must be a valid mode";

static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mode); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mode) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_mode);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":171 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_basestring); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  Py_INCREF(__pyx_v_mode);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_mode);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":172 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; goto __pyx_L1;}
    __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_v_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":173 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
  __pyx_4 = PySequence_Contains(__pyx_2, __pyx_v_mode); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;}
  __pyx_4 = !__pyx_4;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":174 */
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
    Py_INCREF(__pyx_k26p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k26p);
    __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":175 */
  __pyx_4 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_mode = __pyx_4;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.mode.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_mode);
  return __pyx_r;
}

static PyObject *__pyx_n_IndexError;
static PyObject *__pyx_n_str;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int __pyx_v_index;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_index = PyInt_AsLong(__pyx_arg_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":178 */
  __pyx_1 = (__pyx_v_index >= ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len);
  if (!__pyx_1) {
    __pyx_1 = (__pyx_v_index < 0);
  }
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":179 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    __pyx_4 = PyInt_FromLong(__pyx_v_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
    __pyx_4 = 0;
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
    __pyx_4 = 0;
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":180 */
  __pyx_4 = PyInt_FromLong(__pyx_v_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
  __pyx_4 = 0;
  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6rabbyt_12vertexarrays_VertexInfo), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.__getitem__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_len;

static PyObject *__pyx_k27p;

static char (__pyx_k27[]) = "Vertex information should be at most a length of 8";

static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_item); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_item) {
  int __pyx_v_index;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  float __pyx_6;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_item);
  __pyx_v_index = PyInt_AsLong(__pyx_arg_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":183 */
  __pyx_1 = (__pyx_v_index >= ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len);
  if (!__pyx_1) {
    __pyx_1 = (__pyx_v_index < 0);
  }
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":184 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    __pyx_4 = PyInt_FromLong(__pyx_v_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
    __pyx_4 = 0;
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
    __pyx_4 = 0;
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":185 */
  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  Py_INCREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_item);
  __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_5 = PyInt_FromLong(8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_3, __pyx_5, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
  __pyx_1 = __pyx_1 > 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":186 */
    __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
    Py_INCREF(__pyx_k27p);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k27p);
    __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":188 */
  /*try:*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":189 */
    __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L4;}
    __pyx_4 = PyObject_GetItem(__pyx_v_item, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L4;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L4;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).x = __pyx_6;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":190 */
    __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L4;}
    __pyx_3 = PyObject_GetItem(__pyx_v_item, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L4;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).y = __pyx_6;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":191 */
    __pyx_5 = PyInt_FromLong(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L4;}
    __pyx_4 = PyObject_GetItem(__pyx_v_item, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L4;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L4;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).u = __pyx_6;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":192 */
    __pyx_2 = PyInt_FromLong(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L4;}
    __pyx_3 = PyObject_GetItem(__pyx_v_item, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L4;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).v = __pyx_6;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":193 */
    __pyx_5 = PyInt_FromLong(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L4;}
    __pyx_4 = PyObject_GetItem(__pyx_v_item, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L4;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L4;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).red = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_6);

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":194 */
    __pyx_2 = PyInt_FromLong(5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L4;}
    __pyx_3 = PyObject_GetItem(__pyx_v_item, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L4;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).green = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_6);

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":195 */
    __pyx_5 = PyInt_FromLong(6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L4;}
    __pyx_4 = PyObject_GetItem(__pyx_v_item, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L4;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L4;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).blue = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_6);

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":196 */
    __pyx_2 = PyInt_FromLong(7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L4;}
    __pyx_3 = PyObject_GetItem(__pyx_v_item, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L4;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L4;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[__pyx_v_index]).alpha = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_6);
  }
  goto __pyx_L5;
  __pyx_L4:;
  Py_XDECREF(__pyx_5); __pyx_5 = 0;
  Py_XDECREF(__pyx_4); __pyx_4 = 0;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;
  Py_XDECREF(__pyx_3); __pyx_3 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":197 */
  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
  __pyx_1 = PyErr_ExceptionMatches(__pyx_5);
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  if (__pyx_1) {
    __Pyx_AddTraceback("rabbyt.vertexarrays.__setitem__");
    __pyx_4 = __Pyx_GetExcValue(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":198 */
    goto __pyx_L5;
  }
  goto __pyx_L1;
  __pyx_L5:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.__setitem__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_item);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray__grow(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *__pyx_v_self,int __pyx_v_additional_size,PyObject *__pyx_v_exact) {
  int __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_r;
  int __pyx_1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_exact);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":202 */
  __pyx_v_self->_len = (__pyx_v_self->_len + __pyx_v_additional_size);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":203 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_exact); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":204 */
    __pyx_v_new_size = __pyx_v_self->_len;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":206 */
    __pyx_v_new_size = __pyx_v_self->_allocated_size;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":207 */
    while (1) {
      __pyx_1 = (__pyx_v_self->_len > __pyx_v_new_size);
      if (!__pyx_1) break;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":208 */
      __pyx_v_new_size = (__pyx_v_new_size * 2);
    }
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":209 */
  __pyx_1 = (__pyx_v_new_size > __pyx_v_self->_allocated_size);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":210 */
    __pyx_v_self->_vertex_info = ((struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s (*))realloc(__pyx_v_self->_vertex_info,((sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )) * __pyx_v_new_size)));

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":213 */
    for (__pyx_v_i = __pyx_v_self->_allocated_size; __pyx_v_i < __pyx_v_new_size; ++__pyx_v_i) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":214 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).x = 0;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":215 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).y = 0;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":216 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).u = 0;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":217 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).v = 0;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":218 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).red = 255;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":219 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).green = 255;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":220 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).blue = 255;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":221 */
      (__pyx_v_self->_vertex_info[__pyx_v_i]).alpha = 255;
    }

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":222 */
    __pyx_v_self->_allocated_size = __pyx_v_new_size;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray._grow");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_exact);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_set_size[] = "\n        ``set_size(size)``\n\n        Sets the size explicitly.\n\n        This is an alternative to using ``append`` and ``extend``.  (It should\n        be a little faster.)\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_size;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"size",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_size)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":233 */
  __pyx_1 = (__pyx_v_size > ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":234 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
    __pyx_3 = ((struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray *)((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->__pyx_vtab)->_grow(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self),(__pyx_v_size - ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len),__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_size < ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":236 */
    ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len = __pyx_v_size;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":237 */
    ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_allocated_size = __pyx_v_size;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":238 */
    ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info = ((struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s (*))realloc(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info,((sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )) * __pyx_v_size)));
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.set_size");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_False;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_append[] = "\n        ``append(vertex)``\n\n        Appends a vertex to the array.\n\n        vertex should be a tuple of the form\n        ``(x,y,u,v,red,green,blue,alpha)``. (You can also make the tuple\n        shorter; any missing values will be left at the default.)\n\n        Note that ``vertex`` doesn\'t need to be a tuple, but anything\n        supporting item access.  This includes ``VertexInfo`` instances.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertex = 0;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  PyObject *__pyx_8 = 0;
  PyObject *__pyx_9 = 0;
  static char *__pyx_argnames[] = {"vertex",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vertex)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_vertex);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":254 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  __pyx_2 = ((struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray *)((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->__pyx_vtab)->_grow(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self),1,__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":255 */
  /*try:*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":256 */
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_8 = PyInt_FromLong(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    __pyx_9 = PyTuple_New(8); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    PyTuple_SET_ITEM(__pyx_9, 0, __pyx_1);
    PyTuple_SET_ITEM(__pyx_9, 1, __pyx_2);
    PyTuple_SET_ITEM(__pyx_9, 2, __pyx_3);
    PyTuple_SET_ITEM(__pyx_9, 3, __pyx_4);
    PyTuple_SET_ITEM(__pyx_9, 4, __pyx_5);
    PyTuple_SET_ITEM(__pyx_9, 5, __pyx_6);
    PyTuple_SET_ITEM(__pyx_9, 6, __pyx_7);
    PyTuple_SET_ITEM(__pyx_9, 7, __pyx_8);
    __pyx_1 = 0;
    __pyx_2 = 0;
    __pyx_3 = 0;
    __pyx_4 = 0;
    __pyx_5 = 0;
    __pyx_6 = 0;
    __pyx_7 = 0;
    __pyx_8 = 0;
    __pyx_1 = PyInt_FromLong((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len - 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    if (PyObject_SetItem(__pyx_v_self, __pyx_1, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L2;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_9); __pyx_9 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":257 */
    __pyx_2 = PyInt_FromLong((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len - 1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L2;}
    if (PyObject_SetItem(__pyx_v_self, __pyx_2, __pyx_v_vertex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L2;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
  }
  goto __pyx_L3;
  __pyx_L2:;
  Py_XDECREF(__pyx_3); __pyx_3 = 0;
  Py_XDECREF(__pyx_4); __pyx_4 = 0;
  Py_XDECREF(__pyx_5); __pyx_5 = 0;
  Py_XDECREF(__pyx_6); __pyx_6 = 0;
  Py_XDECREF(__pyx_7); __pyx_7 = 0;
  Py_XDECREF(__pyx_8); __pyx_8 = 0;
  Py_XDECREF(__pyx_9); __pyx_9 = 0;
  Py_XDECREF(__pyx_1); __pyx_1 = 0;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":258 */
  /*except:*/ {
    __Pyx_AddTraceback("rabbyt.vertexarrays.append");
    __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":261 */
    ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len = (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len - 1);

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":262 */
    __Pyx_ReRaise();
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  Py_XDECREF(__pyx_8);
  Py_XDECREF(__pyx_9);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.append");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_vertex);
  return __pyx_r;
}

static PyObject *__pyx_n_append;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_extend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_extend[] = "\n        ``extend(vertexes)``\n\n        Iterates over vertexes, calling ``append(vertex)`` on each one.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_extend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertexes = 0;
  PyObject *__pyx_v_v;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"vertexes",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vertexes)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_vertexes);
  __pyx_v_v = Py_None; Py_INCREF(Py_None);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":270 */
  __pyx_1 = PyObject_GetIter(__pyx_v_vertexes); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;}
  for (;;) {
    __pyx_2 = PyIter_Next(__pyx_1);
    if (!__pyx_2) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;}
      break;
    }
    Py_DECREF(__pyx_v_v);
    __pyx_v_v = __pyx_2;
    __pyx_2 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":271 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
    Py_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_v);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.extend");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_v);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_vertexes);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___len__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_11VertexArray___len__(PyObject *__pyx_v_self) {
  int __pyx_r;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":274 */
  __pyx_r = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_enable_arrays(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_enable_arrays[] = "\n        ``enable_arrays()``\n\n        Calls the ``glEnableClientState`` and ``gl*Pointer`` functions to set\n        up this ``VertexArray`` for usage.  This is automatically called when\n        you call ``render()``.\n\n        If you use vertex arrays with PyOpenGL elsewhere in your program, you\n        should always wrap this method in\n        ``glPushClientAttrib``\\/``glPopClientAttrib``.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_enable_arrays(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  int __pyx_1;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":288 */
  glEnableClientState(GL_VERTEX_ARRAY);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":289 */
  glVertexPointer(2,GL_FLOAT,(sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )),((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":290 */
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":291 */
  glTexCoordPointer(2,GL_FLOAT,(sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )),(&(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[0]).u));

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":293 */
  __pyx_1 = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_use_colors;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":294 */
    glEnableClientState(GL_COLOR_ARRAY);

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":295 */
    glColorPointer(4,GL_UNSIGNED_BYTE,(sizeof(struct __pyx_t_6rabbyt_12vertexarrays_vertexinfo_s )),(&(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_vertex_info[0]).red));
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":298 */
    glDisableClientState(GL_COLOR_ARRAY);
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_glDisable;
static PyObject *__pyx_n_enable_arrays;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_render[] = "\n        ``render([start,] [end])``\n\n        Renders the array!\n\n        ``start`` and ``end`` can be specified to only render part of the\n        array.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_11VertexArray_render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  GLuint __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  GLint __pyx_6;
  GLsizei __pyx_7;
  static char *__pyx_argnames[] = {"start","end",0};
  __pyx_v_start = __pyx_k18;
  __pyx_v_end = __pyx_k19;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_start, &__pyx_v_end)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_start);
  Py_INCREF(__pyx_v_end);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":309 */
  __pyx_1 = (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len == 0);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":310 */
    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":311 */
  __pyx_1 = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->texture_id != Py_None;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":312 */
    __pyx_1 = PyObject_IsTrue(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->texture_id); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    if (__pyx_1) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":313 */
      glEnable(GL_TEXTURE_2D);

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":314 */
      __pyx_2 = PyInt_AsUnsignedLongMask(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->texture_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
      glBindTexture(GL_TEXTURE_2D,__pyx_2);
      goto __pyx_L4;
    }
    /*else*/ {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":316 */
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_glDisable); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
      __pyx_4 = PyInt_FromLong(GL_TEXTURE_2D); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
      __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
      __pyx_4 = 0;
      __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":317 */
  __pyx_1 = __pyx_v_end == Py_None;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":318 */
    __pyx_3 = PyInt_FromLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
    Py_DECREF(__pyx_v_end);
    __pyx_v_end = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":319 */
  glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":320 */
  /*try:*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":321 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_enable_arrays); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L7;}
    __pyx_4 = PyObject_CallObject(__pyx_5, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L7;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":322 */
    __pyx_6 = PyInt_AsLong(__pyx_v_start); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L7;}
    __pyx_3 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L7;}
    __pyx_7 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L7;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    glDrawArrays(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)__pyx_v_self)->_mode,__pyx_6,__pyx_7);
  }
  /*finally:*/ {
    int __pyx_why;
    __pyx_why = 0; goto __pyx_L8;
    __pyx_L7: {
      __pyx_why = 4;
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      PyErr_Fetch(&__pyx_5, &__pyx_4, &__pyx_3);
      __pyx_1 = __pyx_lineno;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":324 */
    glPopClientAttrib();
    switch (__pyx_why) {
      case 3: goto __pyx_L0;
      case 4: {
        PyErr_Restore(__pyx_5, __pyx_4, __pyx_3);
        __pyx_lineno = __pyx_1;
        __pyx_5 = 0;
        __pyx_4 = 0;
        __pyx_3 = 0;
        goto __pyx_L1;
      }
    }
  }

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArray.render");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_start);
  Py_DECREF(__pyx_v_end);
  return __pyx_r;
}

static PyObject *__pyx_n_enumerate;

static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_iterable = 0;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  unsigned int __pyx_5;
  static char *__pyx_argnames[] = {"iterable",0};
  __pyx_v_iterable = __pyx_k20;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_iterable)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_iterable);
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
  __pyx_v_index = Py_None; Py_INCREF(Py_None);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":342 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_allocated_size = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":343 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":344 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_mode = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":346 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  Py_INCREF(__pyx_v_iterable);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_iterable);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  __pyx_2 = ((struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes *)((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->__pyx_vtab)->_grow(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self),__pyx_4,__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":347 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_enumerate); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
  Py_INCREF(__pyx_v_iterable);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_iterable);
  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  for (;;) {
    __pyx_1 = PyIter_Next(__pyx_3);
    if (!__pyx_1) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
      break;
    }
    __pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_1 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
    Py_DECREF(__pyx_v_i);
    __pyx_v_i = __pyx_1;
    __pyx_1 = 0;
    __pyx_1 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
    Py_DECREF(__pyx_v_index);
    __pyx_v_index = __pyx_1;
    __pyx_1 = 0;
    if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":348 */
    __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_v_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; goto __pyx_L1;}
    __pyx_4 = PyInt_AsLong(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; goto __pyx_L1;}
    (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[__pyx_4]) = __pyx_5;
  }
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_i);
  Py_DECREF(__pyx_v_index);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_iterable);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":356 */
  __pyx_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_mode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.mode.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_k28p;

static char (__pyx_k28[]) = "must be a valid mode";

static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mode); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mode) {
  int __pyx_r;
  int __pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  unsigned int __pyx_6;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_mode);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":358 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_mode); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
  __pyx_2 = (!__pyx_1);
  if (__pyx_2) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":359 */
    __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
    Py_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_basestring); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
  __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
  Py_INCREF(__pyx_v_mode);
  PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_mode);
  PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
  __pyx_4 = 0;
  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":361 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
    __pyx_5 = PyObject_GetItem(__pyx_3, __pyx_v_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_5;
    __pyx_5 = 0;
    goto __pyx_L2;
  }
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
  __pyx_2 = PySequence_Contains(__pyx_4, __pyx_v_mode); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
  __pyx_2 = !__pyx_2;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_2) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":363 */
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;}
    Py_INCREF(__pyx_k28p);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k28p);
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_4, 0, 0);
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":364 */
  __pyx_6 = PyInt_AsUnsignedLongMask(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_mode = __pyx_6;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.mode.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_mode);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes__grow(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *__pyx_v_self,int __pyx_v_additional_size,PyObject *__pyx_v_exact) {
  int __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_r;
  int __pyx_1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_exact);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":367 */
  __pyx_v_self->_len = (__pyx_v_self->_len + __pyx_v_additional_size);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":369 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_exact); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":370 */
    __pyx_v_new_size = __pyx_v_self->_len;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":372 */
    __pyx_v_new_size = __pyx_v_self->_allocated_size;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":373 */
    __pyx_1 = (__pyx_v_new_size == 0);
    if (__pyx_1) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":374 */
      __pyx_v_new_size = 16;
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":375 */
    while (1) {
      __pyx_1 = (__pyx_v_self->_len > __pyx_v_new_size);
      if (!__pyx_1) break;

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":376 */
      __pyx_v_new_size = (__pyx_v_new_size * 2);
    }
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":377 */
  __pyx_1 = (__pyx_v_new_size > __pyx_v_self->_allocated_size);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":378 */
    __pyx_v_self->_indexes = ((unsigned int (*))realloc(__pyx_v_self->_indexes,((sizeof(unsigned int )) * __pyx_v_new_size)));

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":380 */
    for (__pyx_v_i = __pyx_v_self->_allocated_size; __pyx_v_i < __pyx_v_new_size; ++__pyx_v_i) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":381 */
      (__pyx_v_self->_indexes[__pyx_v_i]) = 0;
    }

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":382 */
    __pyx_v_self->_allocated_size = __pyx_v_new_size;
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes._grow");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_exact);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_append[] = "\n        ``append(index)``\n\n        Appends an index to be drawn.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_index;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  static char *__pyx_argnames[] = {"index",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "I", __pyx_argnames, &__pyx_v_index)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":390 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
  __pyx_2 = ((struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes *)((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->__pyx_vtab)->_grow(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self),1,__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":391 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len - 1)]) = __pyx_v_index;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.append");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_extend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_extend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_indexes = 0;
  PyObject *__pyx_v_i;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"indexes",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_indexes)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_indexes);
  __pyx_v_i = Py_None; Py_INCREF(Py_None);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":394 */
  __pyx_1 = PyObject_GetIter(__pyx_v_indexes); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L1;}
  for (;;) {
    __pyx_2 = PyIter_Next(__pyx_1);
    if (!__pyx_2) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L1;}
      break;
    }
    Py_DECREF(__pyx_v_i);
    __pyx_v_i = __pyx_2;
    __pyx_2 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":395 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
    Py_INCREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_i);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.extend");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_i);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_indexes);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  unsigned int __pyx_v_i;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_i = PyInt_AsUnsignedLongMask(__pyx_arg_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":398 */
  __pyx_1 = (__pyx_v_i >= ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":399 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":400 */
  __pyx_2 = PyLong_FromUnsignedLong((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[__pyx_v_i])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.__getitem__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_index); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_index) {
  unsigned int __pyx_v_i;
  unsigned int __pyx_v_index;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_i = PyInt_AsUnsignedLongMask(__pyx_arg_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
  __pyx_v_index = PyInt_AsUnsignedLongMask(__pyx_arg_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":402 */
  __pyx_1 = (__pyx_v_i >= ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":403 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":404 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[__pyx_v_i]) = __pyx_v_index;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.__setitem__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_safety_check;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_render[] = "\n        ``render(vertex_array, [start, end, enable_arrays, safety_check])``\n\n        This renders the vertexes in ``vertex_array``, which should be an\n        instance of ``VertexArray``.\n\n        ``start`` and ``end`` define which vertexes to render, and default to\n        rendering all of them.\n\n        If ``enable_arrays`` is ``True``, (the default,)\n        ``vertex_array.enable_arrays()`` will be called automatically, along\n        with pushing and popping the client state.  If you are rendering many\n        ``VertexArrayIndexes`` off of the same ``VertexArray``, you might see a\n        small speedup by only calling ``enable_arrays()`` on the\n        ``VertexArray`` once.\n\n        If ``safety_check`` is ``True``, (the default,) the ``safety_check()``\n        method will be called with the length of the ``VertexArray``.  This\n        prevents segmentation faults, but adds a little overhead.  You can set\n        this to ``False`` once your code is debugged.  (Just remember to look\n        if you ever get a segfault!)\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *__pyx_v_vertex_array = 0;
  int __pyx_v_start;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_v_enable_arrays = 0;
  PyObject *__pyx_v_safety_check = 0;
  PyObject *__pyx_v_mode;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  GLenum __pyx_6;
  GLsizei __pyx_7;
  int __pyx_8;
  static char *__pyx_argnames[] = {"vertex_array","start","end","enable_arrays","safety_check",0};
  __pyx_v_start = __pyx_k21;
  __pyx_v_end = __pyx_k22;
  __pyx_v_enable_arrays = __pyx_k23;
  __pyx_v_safety_check = __pyx_k24;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|iOOO", __pyx_argnames, &__pyx_v_vertex_array, &__pyx_v_start, &__pyx_v_end, &__pyx_v_enable_arrays, &__pyx_v_safety_check)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_vertex_array);
  Py_INCREF(__pyx_v_end);
  Py_INCREF(__pyx_v_enable_arrays);
  Py_INCREF(__pyx_v_safety_check);
  __pyx_v_mode = Py_None; Py_INCREF(Py_None);
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertex_array), __pyx_ptype_6rabbyt_12vertexarrays_VertexArray, 0, "vertex_array")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":430 */
  __pyx_1 = __pyx_v_end == Py_None;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":431 */
    __pyx_2 = PyLong_FromUnsignedLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
    Py_DECREF(__pyx_v_end);
    __pyx_v_end = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":433 */
  __pyx_2 = PyInt_FromLong(__pyx_v_start); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_end, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
  __pyx_1 = __pyx_1 <= 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":434 */
    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":436 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_safety_check); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":437 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_safety_check); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    Py_INCREF(((PyObject *)__pyx_v_vertex_array));
    PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_vertex_array));
    __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
    __pyx_5 = 0;
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":439 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; goto __pyx_L1;}
  __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":440 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_mode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;}
    Py_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":442 */
    __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_vertex_array), __pyx_n_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; goto __pyx_L1;}
    Py_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_3;
    __pyx_3 = 0;
  }
  __pyx_L5:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":444 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_enable_arrays); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; goto __pyx_L1;}
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":445 */
    glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":446 */
  /*try:*/ {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":447 */
    __pyx_1 = PyObject_IsTrue(__pyx_v_enable_arrays); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L8;}
    if (__pyx_1) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":448 */
      __pyx_4 = PyObject_GetAttr(((PyObject *)__pyx_v_vertex_array), __pyx_n_enable_arrays); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L8;}
      __pyx_5 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L8;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":449 */
    __pyx_6 = PyInt_AsUnsignedLongMask(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L8;}
    __pyx_2 = PyInt_FromLong(__pyx_v_start); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L8;}
    __pyx_3 = PyNumber_Subtract(__pyx_v_end, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L8;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_7 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L8;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    glDrawElements(__pyx_6,__pyx_7,GL_UNSIGNED_INT,(&(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[__pyx_v_start])));
  }
  /*finally:*/ {
    int __pyx_why;
    __pyx_why = 0; goto __pyx_L9;
    __pyx_L8: {
      __pyx_why = 4;
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
      Py_XDECREF(__pyx_2); __pyx_2 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      PyErr_Fetch(&__pyx_4, &__pyx_5, &__pyx_2);
      __pyx_1 = __pyx_lineno;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":452 */
    __pyx_8 = PyObject_IsTrue(__pyx_v_enable_arrays); if (__pyx_8 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
    if (__pyx_8) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":453 */
      glPopClientAttrib();
      goto __pyx_L11;
    }
    __pyx_L11:;
    switch (__pyx_why) {
      case 3: goto __pyx_L0;
      case 4: {
        PyErr_Restore(__pyx_4, __pyx_5, __pyx_2);
        __pyx_lineno = __pyx_1;
        __pyx_4 = 0;
        __pyx_5 = 0;
        __pyx_2 = 0;
        goto __pyx_L1;
      }
    }
  }

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.render");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_mode);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_vertex_array);
  Py_DECREF(__pyx_v_end);
  Py_DECREF(__pyx_v_enable_arrays);
  Py_DECREF(__pyx_v_safety_check);
  return __pyx_r;
}

static PyObject *__pyx_k29p;

static char (__pyx_k29[]) = "Index out of bounds";

static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_safety_check(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_safety_check[] = "\n        ``safety_check(max_index)``\n\n        Loops through all of the indexes and raises ``ValueError`` if one is\n        greater than or equal to ``max_index``.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_safety_check(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_max_index;
  int __pyx_v_i;
  PyObject *__pyx_r;
  unsigned int __pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"max_index",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_max_index)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":463 */
  __pyx_1 = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_len;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_1; ++__pyx_v_i) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":464 */
    __pyx_2 = ((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)__pyx_v_self)->_indexes[__pyx_v_i]) >= __pyx_v_max_index);
    if (__pyx_2) {

      /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":465 */
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
      Py_INCREF(__pyx_k29p);
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k29p);
      __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __Pyx_Raise(__pyx_5, 0, 0);
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
      goto __pyx_L4;
    }
    __pyx_L4:;
  }

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexArrayIndexes.safety_check");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static unsigned char __pyx_f_6rabbyt_12vertexarrays__to255(float __pyx_v_value) {
  unsigned char __pyx_r;
  int __pyx_1;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":469 */
  __pyx_1 = (__pyx_v_value > 1.0);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":470 */
    __pyx_v_value = 1.0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_value < 0.0);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":472 */
    __pyx_v_value = 0.0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":473 */
  __pyx_r = ((unsigned char )(__pyx_v_value * 255));
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *__pyx_v_parent = 0;
  unsigned int __pyx_v_index;
  int __pyx_r;
  static char *__pyx_argnames[] = {"parent","index",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OI", __pyx_argnames, &__pyx_v_parent, &__pyx_v_index)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_parent);
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6rabbyt_12vertexarrays_VertexArray, 1, "parent")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":502 */
  Py_INCREF(((PyObject *)__pyx_v_parent));
  Py_DECREF(((PyObject *)((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent));
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent = __pyx_v_parent;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":503 */
  ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index = __pyx_v_index;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_parent);
  return __pyx_r;
}

static PyObject *__pyx_n_RuntimeError;

static PyObject *__pyx_k30p;

static char (__pyx_k30[]) = "Accessing VertexInfo property without parent.";

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_check_index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6rabbyt_12vertexarrays_10VertexInfo_check_index[] = "\n        check_index()\n\n        Checks to make sure that the stored index is valid.  ``IndexError`` is\n        raised if it isn\'t.\n        ";
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_check_index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":512 */
  __pyx_1 = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent == Py_None;
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":513 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
    Py_INCREF(__pyx_k30p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k30p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_4, 0, 0);
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":514 */
  __pyx_1 = (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index >= ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_len);
  if (__pyx_1) {

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":515 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;}
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.check_index");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5index___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5index___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":519 */
  __pyx_1 = PyLong_FromUnsignedLong(((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.index.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_x;
static PyObject *__pyx_n_y;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":523 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_y); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.xy.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_xy); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_xy) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_xy);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":525 */
  __pyx_1 = PyObject_GetIter(__pyx_v_xy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_x, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_y, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.xy.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_xy);
  return __pyx_r;
}

static PyObject *__pyx_n_u;
static PyObject *__pyx_n_v;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":529 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_u); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_v); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.uv.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_uv); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_uv) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_uv);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":531 */
  __pyx_1 = PyObject_GetIter(__pyx_v_uv); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_u, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_v, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.uv.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_uv);
  return __pyx_r;
}

static PyObject *__pyx_n_red;
static PyObject *__pyx_n_green;
static PyObject *__pyx_n_blue;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":535 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_red); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_green); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blue); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
  PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_3 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.rgb.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rgb); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rgb) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_rgb);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":537 */
  __pyx_1 = PyObject_GetIter(__pyx_v_rgb); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_red, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_green, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_blue, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.rgb.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_rgb);
  return __pyx_r;
}

static PyObject *__pyx_n_alpha;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":541 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_red); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_green); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blue); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;}
  __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_alpha); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;}
  __pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2);
  PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3);
  PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_3 = 0;
  __pyx_4 = 0;
  __pyx_r = __pyx_5;
  __pyx_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.rgba.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rgba); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rgba) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_rgba);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":543 */
  __pyx_1 = PyObject_GetIter(__pyx_v_rgba); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_red, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_green, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_blue, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_alpha, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.rgba.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_rgba);
  return __pyx_r;
}

static PyObject *__pyx_n_check_index;

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":547 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":548 */
  __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).x); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.x.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  float __pyx_v_x;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_x = PyFloat_AsDouble(__pyx_arg_x); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":550 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":551 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).x = __pyx_v_x;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.x.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":555 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":556 */
  __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).y); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.y.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y) {
  float __pyx_v_y;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_y = PyFloat_AsDouble(__pyx_arg_y); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":558 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":559 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).y = __pyx_v_y;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.y.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":563 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":564 */
  __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).u); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.u.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_u); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_u) {
  float __pyx_v_u;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_u = PyFloat_AsDouble(__pyx_arg_u); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":566 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":567 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).u = __pyx_v_u;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.u.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":571 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":572 */
  __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).v); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.v.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_v); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_v) {
  float __pyx_v_v;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_v = PyFloat_AsDouble(__pyx_arg_v); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":574 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":575 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).v = __pyx_v_v;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.v.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":579 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":580 */
  __pyx_1 = PyFloat_FromDouble(((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).red / 255.0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.red.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_red); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_red) {
  float __pyx_v_red;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_red = PyFloat_AsDouble(__pyx_arg_red); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":582 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":583 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).red = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_v_red);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.red.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":587 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":588 */
  __pyx_1 = PyFloat_FromDouble(((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).green / 255.0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.green.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_green); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_green) {
  float __pyx_v_green;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_green = PyFloat_AsDouble(__pyx_arg_green); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":590 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":591 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).green = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_v_green);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.green.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":595 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":596 */
  __pyx_1 = PyFloat_FromDouble(((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).blue / 255.0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.blue.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blue); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blue) {
  float __pyx_v_blue;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_blue = PyFloat_AsDouble(__pyx_arg_blue); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":598 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":599 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).blue = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_v_blue);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.blue.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":603 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":604 */
  __pyx_1 = PyFloat_FromDouble(((((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).alpha / 255.0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.alpha.__get__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_alpha); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_alpha) {
  float __pyx_v_alpha;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_alpha = PyFloat_AsDouble(__pyx_arg_alpha); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":606 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_check_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":607 */
  (((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_parent->_vertex_info[((struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)__pyx_v_self)->_index]).alpha = __pyx_f_6rabbyt_12vertexarrays__to255(__pyx_v_alpha);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.alpha.__set__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_getattr;

static PyObject *__pyx_k31p;

static char (__pyx_k31[]) = "x y u v red green blue alpha";

static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_f_6rabbyt_12vertexarrays_10VertexInfo___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int __pyx_v_index;
  PyObject *__pyx_v_name;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_name = Py_None; Py_INCREF(Py_None);
  __pyx_v_index = PyInt_AsLong(__pyx_arg_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":610 */
  __pyx_1 = PyObject_GetAttr(__pyx_k31p, __pyx_n_split); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyInt_FromLong(__pyx_v_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; goto __pyx_L1;}
  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_v_name);
  __pyx_v_name = __pyx_3;
  __pyx_3 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":611 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_getattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self);
  Py_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_name);
  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.__getitem__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_name);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_setattr;

static PyObject *__pyx_k32p;

static char (__pyx_k32[]) = "x y u v red green blue alpha";

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_arg_value) {
  int __pyx_v_index;
  float __pyx_v_value;
  PyObject *__pyx_v_name;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_name = Py_None; Py_INCREF(Py_None);
  __pyx_v_index = PyInt_AsLong(__pyx_arg_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
  __pyx_v_value = PyFloat_AsDouble(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":614 */
  __pyx_1 = PyObject_GetAttr(__pyx_k32p, __pyx_n_split); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyInt_FromLong(__pyx_v_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_v_name);
  __pyx_v_name = __pyx_3;
  __pyx_3 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":615 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_setattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
  __pyx_1 = PyFloat_FromDouble(__pyx_v_value); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
  Py_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_name);
  PyTuple_SET_ITEM(__pyx_3, 2, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("rabbyt.vertexarrays.VertexInfo.__setitem__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_name);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___len__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___len__(PyObject *__pyx_v_self) {
  int __pyx_r;
  Py_INCREF(__pyx_v_self);

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":618 */
  __pyx_r = 8;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_False, "False"},
  {&__pyx_n_IndexError, "IndexError"},
  {&__pyx_n_LINES, "LINES"},
  {&__pyx_n_LINE_LOOP, "LINE_LOOP"},
  {&__pyx_n_LINE_STRIP, "LINE_STRIP"},
  {&__pyx_n_POINTS, "POINTS"},
  {&__pyx_n_QUADS, "QUADS"},
  {&__pyx_n_QUAD_STRIP, "QUAD_STRIP"},
  {&__pyx_n_RuntimeError, "RuntimeError"},
  {&__pyx_n_TRIANGLES, "TRIANGLES"},
  {&__pyx_n_TRIANGLE_FAN, "TRIANGLE_FAN"},
  {&__pyx_n_TRIANGLE_STRIP, "TRIANGLE_STRIP"},
  {&__pyx_n_True, "True"},
  {&__pyx_n_ValueError, "ValueError"},
  {&__pyx_n___author__, "__author__"},
  {&__pyx_n___credits__, "__credits__"},
  {&__pyx_n___docs_all__, "__docs_all__"},
  {&__pyx_n__mode_mapping, "_mode_mapping"},
  {&__pyx_n_alpha, "alpha"},
  {&__pyx_n_append, "append"},
  {&__pyx_n_basestring, "basestring"},
  {&__pyx_n_blue, "blue"},
  {&__pyx_n_bool, "bool"},
  {&__pyx_n_check_index, "check_index"},
  {&__pyx_n_enable_arrays, "enable_arrays"},
  {&__pyx_n_enumerate, "enumerate"},
  {&__pyx_n_getattr, "getattr"},
  {&__pyx_n_glDisable, "glDisable"},
  {&__pyx_n_green, "green"},
  {&__pyx_n_isinstance, "isinstance"},
  {&__pyx_n_key, "key"},
  {&__pyx_n_len, "len"},
  {&__pyx_n_list, "list"},
  {&__pyx_n_mode, "mode"},
  {&__pyx_n_red, "red"},
  {&__pyx_n_safety_check, "safety_check"},
  {&__pyx_n_setattr, "setattr"},
  {&__pyx_n_split, "split"},
  {&__pyx_n_str, "str"},
  {&__pyx_n_u, "u"},
  {&__pyx_n_v, "v"},
  {&__pyx_n_x, "x"},
  {&__pyx_n_y, "y"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k4p, __pyx_k4, sizeof(__pyx_k4)},
  {&__pyx_k5p, __pyx_k5, sizeof(__pyx_k5)},
  {&__pyx_k25p, __pyx_k25, sizeof(__pyx_k25)},
  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
  {&__pyx_k27p, __pyx_k27, sizeof(__pyx_k27)},
  {&__pyx_k28p, __pyx_k28, sizeof(__pyx_k28)},
  {&__pyx_k29p, __pyx_k29, sizeof(__pyx_k29)},
  {&__pyx_k30p, __pyx_k30, sizeof(__pyx_k30)},
  {&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)},
  {&__pyx_k32p, __pyx_k32, sizeof(__pyx_k32)},
  {0, 0, 0}
};
static struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray __pyx_vtable_6rabbyt_12vertexarrays_VertexArray;

static PyObject *__pyx_tp_new_6rabbyt_12vertexarrays_VertexArray(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)o;
  *(struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArray **)&p->__pyx_vtab = __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArray;
  p->texture_id = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexArray(PyObject *o) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++o->ob_refcnt;
    __pyx_f_6rabbyt_12vertexarrays_11VertexArray___dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --o->ob_refcnt;
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->texture_id);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexArray(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)o;
  if (p->texture_id) {
    e = (*v)(p->texture_id, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6rabbyt_12vertexarrays_VertexArray(PyObject *o) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)o;
  Py_XDECREF(p->texture_id);
  p->texture_id = Py_None; Py_INCREF(Py_None);
  return 0;
}
static PyObject *__pyx_sq_item_6rabbyt_12vertexarrays_VertexArray(PyObject *o, int i) {
  PyObject *r;
  PyObject *x = PyInt_FromLong(i); if(!x) return 0;
  r = o->ob_type->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexArray(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_11VertexArray___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %s", o->ob_type->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_11VertexArray_use_colors(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_11VertexArray_use_colors(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_11VertexArray_10use_colors___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_11VertexArray_mode(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_11VertexArray_mode(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_11VertexArray_4mode___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_6rabbyt_12vertexarrays_VertexArray[] = {
  {"set_size", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_11VertexArray_set_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_set_size},
  {"append", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_11VertexArray_append, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_append},
  {"extend", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_11VertexArray_extend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_extend},
  {"enable_arrays", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_11VertexArray_enable_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_enable_arrays},
  {"render", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_11VertexArray_render, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_11VertexArray_render},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_6rabbyt_12vertexarrays_VertexArray[] = {
  {"texture_id", T_OBJECT, offsetof(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray, texture_id), 0, 0},
  {0, 0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6rabbyt_12vertexarrays_VertexArray[] = {
  {"use_colors", __pyx_getprop_6rabbyt_12vertexarrays_11VertexArray_use_colors, __pyx_setprop_6rabbyt_12vertexarrays_11VertexArray_use_colors, __pyx_k1, 0},
  {"mode", __pyx_getprop_6rabbyt_12vertexarrays_11VertexArray_mode, __pyx_setprop_6rabbyt_12vertexarrays_11VertexArray_mode, __pyx_k2, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VertexArray = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_VertexArray = {
  __pyx_f_6rabbyt_12vertexarrays_11VertexArray___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6rabbyt_12vertexarrays_VertexArray, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_VertexArray = {
  __pyx_f_6rabbyt_12vertexarrays_11VertexArray___len__, /*mp_length*/
  __pyx_f_6rabbyt_12vertexarrays_11VertexArray___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexArray, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_VertexArray = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6rabbyt_12vertexarrays_VertexArray = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "rabbyt.vertexarrays.VertexArray", /*tp_name*/
  sizeof(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexArray, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_VertexArray, /*tp_as_number*/
  &__pyx_tp_as_sequence_VertexArray, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_VertexArray, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_VertexArray, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    ``VertexArray(mode=\"QUADS\", use_colors=True)``\n\n    OpenGL vertex arrays provide a way to push a large amount of data to the\n    video hardware, very fast.  ``VertexArray`` provides an easy to use class\n    to take advantage of this speed.\n\n    ``VertexArray`` supports both item access and assignment using\n    ``VertexInfo`` objects.  For example, this would work as expected:\n\n        .. sourcecode:: python\n\n            vertex_array[0].x += 1\n\n    You can also assign using tuples, just like as documented in the append\n    method:\n\n        .. sourcecode:: python\n\n            vertex_array[0] = (x, y, u, v, red, green, blue, alpha)\n    ", /*tp_doc*/
  __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexArray, /*tp_traverse*/
  __pyx_tp_clear_6rabbyt_12vertexarrays_VertexArray, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6rabbyt_12vertexarrays_VertexArray, /*tp_methods*/
  __pyx_members_6rabbyt_12vertexarrays_VertexArray, /*tp_members*/
  __pyx_getsets_6rabbyt_12vertexarrays_VertexArray, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_6rabbyt_12vertexarrays_11VertexArray___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6rabbyt_12vertexarrays_VertexArray, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};
static struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes __pyx_vtable_6rabbyt_12vertexarrays_VertexArrayIndexes;

static PyObject *__pyx_tp_new_6rabbyt_12vertexarrays_VertexArrayIndexes(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes *)o;
  *(struct __pyx_vtabstruct_6rabbyt_12vertexarrays_VertexArrayIndexes **)&p->__pyx_vtab = __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArrayIndexes;
  return o;
}

static void __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexArrayIndexes(PyObject *o) {
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexArrayIndexes(PyObject *o, visitproc v, void *a) {
  return 0;
}

static int __pyx_tp_clear_6rabbyt_12vertexarrays_VertexArrayIndexes(PyObject *o) {
  return 0;
}
static PyObject *__pyx_sq_item_6rabbyt_12vertexarrays_VertexArrayIndexes(PyObject *o, int i) {
  PyObject *r;
  PyObject *x = PyInt_FromLong(i); if(!x) return 0;
  r = o->ob_type->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexArrayIndexes(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %s", o->ob_type->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_18VertexArrayIndexes_mode(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_18VertexArrayIndexes_mode(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_4mode___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_6rabbyt_12vertexarrays_VertexArrayIndexes[] = {
  {"append", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_append, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_append},
  {"extend", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_extend, METH_VARARGS|METH_KEYWORDS, 0},
  {"render", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_render, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_render},
  {"safety_check", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes_safety_check, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_18VertexArrayIndexes_safety_check},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6rabbyt_12vertexarrays_VertexArrayIndexes[] = {
  {"mode", __pyx_getprop_6rabbyt_12vertexarrays_18VertexArrayIndexes_mode, __pyx_setprop_6rabbyt_12vertexarrays_18VertexArrayIndexes_mode, __pyx_k3, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VertexArrayIndexes = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_VertexArrayIndexes = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6rabbyt_12vertexarrays_VertexArrayIndexes, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_VertexArrayIndexes = {
  0, /*mp_length*/
  __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexArrayIndexes, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_VertexArrayIndexes = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6rabbyt_12vertexarrays_VertexArrayIndexes = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "rabbyt.vertexarrays.VertexArrayIndexes", /*tp_name*/
  sizeof(struct __pyx_obj_6rabbyt_12vertexarrays_VertexArrayIndexes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_VertexArrayIndexes, /*tp_as_number*/
  &__pyx_tp_as_sequence_VertexArrayIndexes, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_VertexArrayIndexes, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_VertexArrayIndexes, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    ``VertexArrayIndexes([sequence])``\n\n    Provides a way to list by indexes the vertexes to be rendered.\n\n    This is useful if you have multiple primitives sharing a vertex, and you\n    want to either save memory or make it easier to modify the data.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_traverse*/
  __pyx_tp_clear_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6rabbyt_12vertexarrays_VertexArrayIndexes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_6rabbyt_12vertexarrays_VertexInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)o;
  p->_parent = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexInfo(PyObject *o) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)o;
  Py_XDECREF(((PyObject *)p->_parent));
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)o;
  if (p->_parent) {
    e = (*v)(((PyObject*)p->_parent), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6rabbyt_12vertexarrays_VertexInfo(PyObject *o) {
  struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *p = (struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo *)o;
  Py_XDECREF(((PyObject *)p->_parent));
  p->_parent = ((struct __pyx_obj_6rabbyt_12vertexarrays_VertexArray *)Py_None); Py_INCREF(Py_None);
  return 0;
}
static PyObject *__pyx_sq_item_6rabbyt_12vertexarrays_VertexInfo(PyObject *o, int i) {
  PyObject *r;
  PyObject *x = PyInt_FromLong(i); if(!x) return 0;
  r = o->ob_type->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexInfo(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %s", o->ob_type->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_index(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5index___get__(o);
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_xy(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_xy(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2xy___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_uv(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_uv(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_2uv___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_rgb(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_rgb(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3rgb___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_rgba(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_rgba(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4rgba___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_x(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_x(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1x___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_y(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_y(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1y___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_u(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_u(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1u___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_v(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_v(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_1v___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_red(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_red(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_3red___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_green(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_green(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5green___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_blue(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_blue(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_4blue___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_alpha(PyObject *o, void *x) {
  return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___get__(o);
}

static int __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_alpha(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_f_6rabbyt_12vertexarrays_10VertexInfo_5alpha___set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static struct PyMethodDef __pyx_methods_6rabbyt_12vertexarrays_VertexInfo[] = {
  {"check_index", (PyCFunction)__pyx_f_6rabbyt_12vertexarrays_10VertexInfo_check_index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6rabbyt_12vertexarrays_10VertexInfo_check_index},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6rabbyt_12vertexarrays_VertexInfo[] = {
  {"index", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_index, 0, 0, 0},
  {"xy", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_xy, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_xy, 0, 0},
  {"uv", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_uv, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_uv, 0, 0},
  {"rgb", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_rgb, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_rgb, 0, 0},
  {"rgba", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_rgba, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_rgba, 0, 0},
  {"x", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_x, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_x, 0, 0},
  {"y", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_y, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_y, 0, 0},
  {"u", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_u, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_u, 0, 0},
  {"v", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_v, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_v, 0, 0},
  {"red", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_red, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_red, 0, 0},
  {"green", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_green, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_green, 0, 0},
  {"blue", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_blue, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_blue, 0, 0},
  {"alpha", __pyx_getprop_6rabbyt_12vertexarrays_10VertexInfo_alpha, __pyx_setprop_6rabbyt_12vertexarrays_10VertexInfo_alpha, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VertexInfo = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_VertexInfo = {
  __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6rabbyt_12vertexarrays_VertexInfo, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_VertexInfo = {
  __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___len__, /*mp_length*/
  __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6rabbyt_12vertexarrays_VertexInfo, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_VertexInfo = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6rabbyt_12vertexarrays_VertexInfo = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "rabbyt.vertexarrays.VertexInfo", /*tp_name*/
  sizeof(struct __pyx_obj_6rabbyt_12vertexarrays_VertexInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6rabbyt_12vertexarrays_VertexInfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_VertexInfo, /*tp_as_number*/
  &__pyx_tp_as_sequence_VertexInfo, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_VertexInfo, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_VertexInfo, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Provides an interface to a single vertex in a ``VertexArray`` object.\n\n    You probably won\'t ever want to instance this class yourself.  Instead,\n    use \"``vertex_array[index]``\".\n\n    There are a number of properties for modifing the vertex data:\n\n        ``x``, ``y``, ``u``, ``v``, ``red``, ``green``, ``blue``, ``alpha``\n\n    You can also use these shortcuts to read/write multiple values at a time:\n\n        ``xy``, ``uv``, ``rgb``, ``rgba``\n\n    For example::\n\n        vertex_array[index].x += 5\n        vertex_array[index].rgb = 1.0, 0.0, 0.0\n\n    And just in case if it\'s not obvious, ``u`` and ``v`` are the texture\n    coordinates.\n    ", /*tp_doc*/
  __pyx_tp_traverse_6rabbyt_12vertexarrays_VertexInfo, /*tp_traverse*/
  __pyx_tp_clear_6rabbyt_12vertexarrays_VertexInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6rabbyt_12vertexarrays_VertexInfo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6rabbyt_12vertexarrays_VertexInfo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_6rabbyt_12vertexarrays_10VertexInfo___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6rabbyt_12vertexarrays_VertexInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initvertexarrays(void); /*proto*/
PyMODINIT_FUNC initvertexarrays(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("vertexarrays", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArray = &__pyx_vtable_6rabbyt_12vertexarrays_VertexArray;
  *(void(**)())&__pyx_vtable_6rabbyt_12vertexarrays_VertexArray._grow = (void(*)())__pyx_f_6rabbyt_12vertexarrays_11VertexArray__grow;
  __pyx_type_6rabbyt_12vertexarrays_VertexArray.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_6rabbyt_12vertexarrays_VertexArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_6rabbyt_12vertexarrays_VertexArray.tp_dict, __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "VertexArray", (PyObject *)&__pyx_type_6rabbyt_12vertexarrays_VertexArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;}
  __pyx_ptype_6rabbyt_12vertexarrays_VertexArray = &__pyx_type_6rabbyt_12vertexarrays_VertexArray;
  __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArrayIndexes = &__pyx_vtable_6rabbyt_12vertexarrays_VertexArrayIndexes;
  *(void(**)())&__pyx_vtable_6rabbyt_12vertexarrays_VertexArrayIndexes._grow = (void(*)())__pyx_f_6rabbyt_12vertexarrays_18VertexArrayIndexes__grow;
  if (PyType_Ready(&__pyx_type_6rabbyt_12vertexarrays_VertexArrayIndexes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_6rabbyt_12vertexarrays_VertexArrayIndexes.tp_dict, __pyx_vtabptr_6rabbyt_12vertexarrays_VertexArrayIndexes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "VertexArrayIndexes", (PyObject *)&__pyx_type_6rabbyt_12vertexarrays_VertexArrayIndexes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  __pyx_ptype_6rabbyt_12vertexarrays_VertexArrayIndexes = &__pyx_type_6rabbyt_12vertexarrays_VertexArrayIndexes;
  __pyx_type_6rabbyt_12vertexarrays_VertexInfo.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_6rabbyt_12vertexarrays_VertexInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "VertexInfo", (PyObject *)&__pyx_type_6rabbyt_12vertexarrays_VertexInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
  __pyx_ptype_6rabbyt_12vertexarrays_VertexInfo = &__pyx_type_6rabbyt_12vertexarrays_VertexInfo;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":2 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n___credits__, __pyx_k4p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":20 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_k5p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":85 */
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(GL_QUADS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_QUADS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_QUAD_STRIP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_QUAD_STRIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_TRIANGLES); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_TRIANGLES) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_TRIANGLE_STRIP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_TRIANGLE_STRIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_TRIANGLE_FAN); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_TRIANGLE_FAN) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_LINES); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_LINES) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_LINE_STRIP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_LINE_STRIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_LINE_LOOP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_LINE_LOOP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyInt_FromLong(GL_POINTS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
  if (PyDict_SetItem(__pyx_1, __pyx_2, __pyx_n_POINTS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n__mode_mapping, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":96 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_list); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  for (;;) {
    __pyx_3 = PyIter_Next(__pyx_2);
    if (!__pyx_3) {
      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
      break;
    }
    if (PyObject_SetAttr(__pyx_m, __pyx_n_key, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":97 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__mode_mapping); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_key); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    __pyx_6 = PyObject_GetItem(__pyx_4, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (PyObject_SetItem(__pyx_3, __pyx_6, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
  }
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":135 */
  Py_INCREF(__pyx_n_QUADS);
  __pyx_k16 = __pyx_n_QUADS;
  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
  __pyx_k17 = __pyx_4;
  __pyx_4 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":300 */
  __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;}
  __pyx_k18 = __pyx_5;
  __pyx_5 = 0;
  Py_INCREF(Py_None);
  __pyx_k19 = Py_None;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":341 */
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
  __pyx_k20 = __pyx_1;
  __pyx_1 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":406 */
  __pyx_k21 = 0;
  Py_INCREF(Py_None);
  __pyx_k22 = Py_None;
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L1;}
  __pyx_k23 = __pyx_3;
  __pyx_3 = 0;
  __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L1;}
  __pyx_k24 = __pyx_6;
  __pyx_6 = 0;

  /* "/home/mmarshall/projects/rabbyt/rabbyt/rabbyt.vertexarrays.pyx":620 */
  __pyx_2 = PyObject_GetAttr(__pyx_k25p, __pyx_n_split); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; goto __pyx_L1;}
  __pyx_7 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n___docs_all__, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; goto __pyx_L1;}
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("rabbyt.vertexarrays");
}

static char *__pyx_filenames[] = {
  "rabbyt.vertexarrays.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, obj->ob_type->tp_name);
    return 0;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type)) {
        if (PyErr_Warn(PyExc_DeprecationWarning,
                "raising a string exception is deprecated"))
            goto raise_error;
    }
    else if (PyType_Check(type) || PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        if (PyInstance_Check(type))
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
        else
            type = (PyObject*) type->ob_type;
        Py_INCREF(type);
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static PyObject *__Pyx_GetExcValue(void) {
    PyObject *type = 0, *value = 0, *tb = 0;
    PyObject *result = 0;
    PyThreadState *tstate = PyThreadState_Get();
    PyErr_Fetch(&type, &value, &tb);
    PyErr_NormalizeException(&type, &value, &tb);
    if (PyErr_Occurred())
        goto bad;
    if (!value) {
        value = Py_None;
        Py_INCREF(value);
    }
    Py_XDECREF(tstate->exc_type);
    Py_XDECREF(tstate->exc_value);
    Py_XDECREF(tstate->exc_traceback);
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    result = value;
    Py_XINCREF(result);
    type = 0;
    value = 0;
    tb = 0;
bad:
    Py_XDECREF(type);
    Py_XDECREF(value);
    Py_XDECREF(tb);
    return result;
}

static void __Pyx_ReRaise(void) {
    PyThreadState *tstate = PyThreadState_Get();
    PyObject *type = tstate->exc_type;
    PyObject *value = tstate->exc_value;
    PyObject *tb = tstate->exc_traceback;
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    PyErr_Restore(type, value, tb);
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *iter) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred())
            __Pyx_UnpackError();
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_UnpackError();
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
    PyObject *pycobj = 0;
    int result;
    
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
    if (!pycobj)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
        goto bad;
    result = 0;
    goto done;

bad:
    result = -1;
done:
    Py_XDECREF(pycobj);
    return result;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
